Enemy Looking Around when LOS is Broken

Get help using Construct 2

Post » Sat Nov 30, 2013 11:07 pm

Hey there.. was curious if anyone has run into the challenge of making an enemy (esp. when multiple of the same type) will look around randomly whenever you are out of their line of sight. I feel like I'm doing everything i need to be doing with the actions, but its not working at all.. This is what I have:



Obviously its wrong because it's not working, but I cant think of any other way to do it?

Any help would be massively amazing, i appreciate your time. :D
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Sun Dec 01, 2013 12:29 am

I'd put the random seconds at the top, or instead, have a variable/counter for each enemy and have that count down.

Once it hits zero, trigger the event and set a new counter amount.

I did a web demo - they turn green if they can see you, red if not.

Mouse over to see counter and direction boolean.

http://johnnysix.net/games/LineOfSight/

CAPX :

http://johnnysix.net/games/LineOfSight.capx

Image with events :

JohnnySix2013-12-01 00:29:53
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Sun Dec 01, 2013 1:47 am

This helped me so much, Johnnysix, thank you so much!!
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 38 guests