How do I Make an object spawn in a specified zone

Get help using Construct 2

Post » Sat Mar 28, 2015 12:50 am

So i have a player that is stationary and the background slides to emulate running, the player cannot jump or move and i have birds that can spawn and fly overhead, i have a zone for them to drop eggs, some will hit the player, and some will not.

i have it set so that the player is between X:177 and X:477 so i have this code which doesn't work oddly.

If bird's X= Random(177,477), spawn egg on bird.X and bird.Y

since the x's around the player are set wide, some will hit and others will miss but the code above isn't doing its function Image
B
6
S
1
Posts: 17
Reputation: 391

Post » Sat Mar 28, 2015 8:06 am

change it to

events
every choose(1,2,3) seconds
bird.X > 177
bird.Y < 442
action
create egg

it will drop and egg within the specified X range randomly 1,2 or 3 seconds. :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, R0J0hound, tarek2, Yahoo [Bot] and 15 guests