Object spawner

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I'm doing a continuously scrolling game. I want to create objects that spawn pick ups, enemies, asteroids at varying times from off screen ahead of the player.

    I want to give it a time variable so that it waits between 5 and 20 seconds before spawning again and then make it continuously loop this function while the game is playing.

  • I would make an object spawner, and give it the Timer Behavior. Start the Timer as a run Once and give it a random time.

    Then in the OnTimer event spawn whatever you want, then restart the timer with a time of random(5,20). But only use the Once parameter since you are changing the time length each time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Jobel!

    This gave me a good starting point, though what I did was a lot more complicated. I created families of different spawners that it would choose a random instance within the family to spawn. Those had a bullet behavior and spawned their associated sprites when they hit a collision box.

    Now I have many different spawners set to different times. I just need to figure out how to cancel one spawn if its timer overlaps on the same time value as another spawn timer.

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