How Can I make multiple instances of an enemy all attack?

  • I'm currently working on a top down bullet hell game where enemies chase the player and shoot at him. However, when I add the events that make enemies shoot at a certain interval, it only applies to one of them at a time even though several can be on-screen at once. How can I make them all do the same action?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    Normally I did not have this problem, so maybe it's some issue with your configuration, but OK, I can offer you a solution for your situation.

    Create a GLOBAL variable SHOOT = 0

    Say:

    SYSTEM Every X seconds (e.g. every second)

    AND when SHOOT = 1

    ACTION = Enemy shoots

    So regulate their shooting by turning ON and OFF the SHOOT variable.

    Another TIP:

    A cool tip is to say every X seconds (e.g. 0.5)

    SYSTEM pick a random enemy instance

    SHOOT

    This creates a more realistic game rather than all shooting at same time.

    Good Luck!

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