How do I check if a hero isn't see by all the ennemies

Get help using Construct 2

Post » Wed May 13, 2015 2:12 pm

Hi folks,

Let's say I have a game with a hero, and multiples ennemies with the line of sight behavior. I want to trigger an event when all the ennemies can't see the hero. All of them.

Is there an easy way to achieve that ?
B
4
Posts: 7
Reputation: 214

Post » Wed May 13, 2015 2:29 pm

There must be an easier way but..

system every tick - set Globalvariable = enemy.count

for each enemy
enemy has not line of sight - subtract 1 from GlobalVariable

system compare two values - GlobalVariable = 0
>add action
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu May 14, 2015 8:16 am

Thank you very much. It works fine !
B
4
Posts: 7
Reputation: 214


Return to How do I....?

Who is online

Users browsing this forum: fens, plinkie and 19 guests