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

0 favourites
  • 3 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • 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.

  • 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).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)