Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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
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).
Develop games in your browser. Powerful, performant & highly capable.
Setting the variable with choose did the job thank you for that