playMaker

Author Topic: Create random drop items  (Read 506 times)

Seiryu33

  • Full Member
  • ***
  • Posts: 133
Create random drop items
« on: May 29, 2022, 01:05:40 PM »
So this is one that I'm having trouble with. I want to create random drop items: like an enemy will drop a curative item but at random times drop a rare item. I have no idea how to achieve this. I've seen threads about creating random items at different locations but this is about creating multiple random items from one specific location.

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Create random drop items
« Reply #1 on: May 29, 2022, 01:49:01 PM »
It would be really pretty simple. You could just use the playmaker action for sending random events. Each event would be a different item, then it would set the game object variable or prefab that's going to spawn. Then the last state in that FSM would be to spawn the object at the position.

If you have a real lot of items to randomly distribute you might have one "manager" type setup that just sets all the drops up.

Also for lists of things, the ArrayMaker addon can be your friend, it's got way more actions than built in arrays.

But yeah it doesn't need to be very complex to do something like random pick.