How do I properly trigger an event once per enemy

Get help using Construct 2

Post » Thu Jan 28, 2016 10:25 am

Okay, so I've been using Construct for years now and I feel so stupid for not knowing this.. I'm sure I've sorted it in the past but I'm struggling with it right now.

I have many enemies and I want a little icon to pop up over their heads when they're alerted (think Metal Gear).
I want this to happen once per enemy but when it happens. I want them to start other actions too on a state change but I just want to start with this one simple action to see it's working.

So when one enemy changes state an icon pops up.. except it works for the first enemy, then all others it continues to spawn - I've tried every combination of actions I could think of so I would love some advice on how to do this properly!


I suppose this is what I'm aiming for:

enemy variable state = "idle"
For each enemy
Trigger once
{
Spawn icon
}
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Thu Jan 28, 2016 11:47 am

Solved.. I've been working so much this week I hadn't realised there was a better way.
Called a state change function when needed now instead.
B
14
S
2
G
6
Posts: 52
Reputation: 3,633


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, ColombageEnPLS, doriHOG, rustomatic, zenox98 and 3 guests