How do I Spawn Obstacles

Get help using Construct 2

Post » Thu Feb 09, 2017 6:34 am

Hello,

Some help pls :)

I am working on Infinity Runner and I am trying to spawn random obstacle. Lets say I have 3 different Obstacle Object and I want them to spawn randomly but I also want them to have a Fixed GAP between each other so they dont over lap. Is it possible to make it something like this.

If I have a pool with obstacles objects and each obj will have its own ID, then randomly one of 3 objects will be pulled from the pool?
B
14
S
2
Posts: 21
Reputation: 744

Post » Thu Feb 09, 2017 10:21 am

make sprite (enemy) with 3 animation frame (obstales)

every (choose(1, 1.5, 3) second) = spawn enemy
every (choose(1, 1.5, 3) second)
if enemy position is out of frame > set animation frame of enemy choose(0, 1, 2)
Image
B
65
S
40
G
46
Posts: 657
Reputation: 32,869


Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag, Yahoo [Bot] and 26 guests