How do I make the enemy spawn bullets at different timings?

0 favourites
  • 4 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • The events sheet looks something like this:

    System: every 6 seconds enemy: spawn bullet

    enemy refers to all the enemies in the map.

  • What you could do is every: random(4,6) seconds enemy spawn bullet. That would make a bullet spawn between 4 and 6 seconds. Or when the enemy is spawned or when the game starts you could give it an instance value of random(0,6) and have a timer subtracting that value every second. When it reaches zero you could spawn the bullet and reset the timer to 6. Hope that helps.

  • You have to "pick" the instance you want to act on or else all instances will be picked.

    In short you have to figure out a way to single out the instance you want to fire separate from the other instances.

    In my prototype space shooter in my sig I used the technique mentioned by currypuff. My basic enemy ship each shoot at a random time.. it works for the most part. Some of my enemies, however, are picked by distance from player and others using a collision with an invisible sprite barrier... you have to figure out what works for your specific need.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, thanks!

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