Construct failing to treat objects as individual entities

This forum is currently in read-only mode.
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I wasn't sure if this was a bug or if this is being caused by something that I'm doing wrong. I was pretty close to submitting this to the bug tracker but then I reconsidered since this may not be a bug (or maybe it is, I don't know).

    Anyway, take a look at this:

    http://machriderx.googlepages.com/shooter.cap

    Open the .cap and run the layout. Notice that when you shoot an enemy, it destroys all the enemies at once.

    Now go to the event editor, remove the "enemy is on screen" condition (only the "enemy on screen" one, leave the collision condition alone) and run it again. Now the enemies are destroyed by your bullets one at a time, how it should be.

    I'm puzzled though. Why does adding the event "enemy is on screen" make it so that it destroys all enemies? Is this a bug?

    If it isn't, how do I make it check for whether each individual enemy is on screen? I thought it was automatically supposed to do that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to move the "Is on screen" condition below the collision condition, otherwise it picks all of the enemies on the screen. This is because conditions are read from the top down.

  • Thanks. I knew I was doing something wrong. I didn't know the order mattered. I'll keep that in mind from now on.

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