Make enemy stop following after losing line of sight

Get help using Construct 2

Post » Wed Aug 06, 2014 9:06 pm

Okay so I'm really early in my game. It's an 8 direction movement puzzle. :geek:

I made the enemy first before everything rotate to the player's direction, then I put "Line of sight" and "Bullet" behavior so this way when the enemy sights the player, the bullet is enabled and he goes after him and goes directly to him since he's always turning to the player's angle. :P

The question here is that how do I make him disable the bullet when he loses sight, this is possibly( more likely) a dum question, but I seriously can't find anything about that in the event sheet, no way to disable bullet when line of sight goes.

Thanks much! :D
B
8
S
2
Posts: 10
Reputation: 831

Post » Wed Aug 06, 2014 9:31 pm

Roughly, Has LOS, Enable bullet, else Disable bullet
You do not have the required permissions to view the files attached to this post.
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Wed Aug 06, 2014 9:38 pm

Edit: Blackhornet posted during this. I was going to suggest looking up "invert condition". Still useful :) Some time you might find it useful to invert the 'has LOS' condition to achieve similar results.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Aug 07, 2014 9:52 am

blackhornet wrote:Roughly, Has LOS, Enable bullet, else Disable bullet

haha Well that was pretty darn simple, can't believe I didn't even notice "else". Thanks much!
B
8
S
2
Posts: 10
Reputation: 831

Post » Thu Aug 07, 2014 10:13 am

codah wrote:Edit: Blackhornet posted during this. I was going to suggest looking up "invert condition". Still useful :) Some time you might find it useful to invert the 'has LOS' condition to achieve similar results.

Thanks a lot I looked it up and it helped me greatly!!! I think I should really test everything in this engine before i continue :P But really thanks a lot!
B
8
S
2
Posts: 10
Reputation: 831


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests