I am trying to make it so when the player levels up there are 3 random power ups he can choose.
I want it so the choosen objects appear only once
My idea was to put all the objects in one gruop and use the “pick a random object” action,i tested it with another gruop (enemys) but it always picks the same object and also i have no idea on how to make the selected object show up in the screem
Hi there. I believe the “Pick a random” in either its condition or action form, only refers to picking a random object that is already present in your scene
So for your monsters, assuming you had at least one of each monster in the scene already, you can use “Pick a random monster” as a condition, and for action you can create an object from it’s name (from the group monster create an object named monster.objectname).
So you can probably already see how to do this for your power ups. You can have the 3 power ups hidden somewhere off screen with visibility off. Then you can use the condition to Pick a Random power up. For your actions you can change position of power up set to where you want it, and turn its visibility on. When you’re done with it, you can delete it so it can’t be chosen again, or if you need to keep it on screen just use the object visibility being off as part of your Pick Random condition.
There are other ways to do what you’re wanting, I was just demonstrating how to do it with a Pick Random.
thanks for the help.
I did what you told me to but it still only picks the first object of the gruop
You said that there are other ways to do this can you give me some examples?
edit: i saw how to do that with animations so i will try it out if it works ill let you know