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
63
S
39
G
42
Posts: 627
Reputation: 30,472


Return to How do I....?

Who is online

Users browsing this forum: chrisyamao, ksiads and 6 guests