I'm trying to figure out how to randomly spawn different objects at different times like in a endless jumper when it spawns a platform I want it to randomly spawning 1 of 7 different platforms instead of just spawning the same platform
Develop games in your browser. Powerful, performant & highly capable.
I do this by setting a variable with choose, so choose(1,2,3,4,5,6,7) will choose one of those numbers at random. Then the number chosen relates to a platform. If var=1, spawn platform 1, if var=2 spawn platform 2 etc.
Here are three different ways you can spawn random objects:
https://www.dropbox.com/s/ukysthmxiv9cf ... .capx?dl=0
Method 1) Add objects to a family and then spawn the family object - a family member will be picked at random.
Method 2) Save different animations on a sprite and then choose a random animation after spawning.
Method 3) Save different frames to an animation on a sprite and then choose a random frame after spawning (remember to set the animation speed to 0 in the sprite settings).
Setting the variable with choose did the job thank you for that