How do I make spawns at a certain distance from one another.

Get help using Construct 2

Post » Tue Jan 20, 2015 7:34 am

I have some boxes spawning on the left. System creates a left redbox every 1second at a random Y (1500,4000).

Then I have the boxes spawning on the right. System creates a right redbox every 1second at a random Y (4000,7000).

Now the problem is, as you can see, they overlap in the sense that their Y's are too close and you can't jump between them (i don't know how to explain). Play the "game" linked and you'll see what i mean. I need a minimum gap between left spawns and right spawns so that the player can jump between that gap.
Last edited by cioclod on Tue Jan 20, 2015 11:48 am, edited 1 time in total.
B
7
S
1
Posts: 39
Reputation: 507

Post » Tue Jan 20, 2015 11:46 am

You could just increase the time but, I would create specific points to spawn from. For example: Draw 6 sprites off screen. 3 on the left and 3 for the right with enough spacing. Uses them as spawning points. Call them spawnbox1, spawnbox2, etc..

Then every 1 second use "choose (spawnbox1,spawnbox2,spawnbox3).
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue Jan 20, 2015 4:12 pm

I used another technique: made the left object spawn another object on it's X axis, and when that object collides with the right redbox it destroys it.

But thank you for your help, your technique is much easier and I will use it in the future.
B
7
S
1
Posts: 39
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 11 guests