Enemy NPC Patrol & Attack

Get help using Construct 2

Post » Sat Feb 16, 2013 1:59 am

That's what I had before trying some suggestions here, and it works great for 1 npc, but I found when I had multiple instances of BOTH the enemy sprite AND the invisible sprite, I couldn't figure out a way to link their actions appropriately. I used the For Each command everywhere, but it only seemed to work half the time depending on the action.

Mr E Bear - If you wouldn't mind, could you upload your capx for me to look at?

Thanks,
Steve
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Sat Feb 16, 2013 7:43 am

Miraculously I figured out a way to do this. This is the event setup I have:



With the Patrol function being:



This works relatively well, but for some reason after they chase me a bit, if I am out of the red box, they will stop, but after running in and out of the box, eventually they stop patrolling altogether. I can't figure out what it is I do that stops them from Patrolling, but the second I'm on the red box, they're back to chasing me.

Can anyone see what's wrong with this setup?

Also another small issue, occasionally they seem to stutter a bit on the patrol function, but not always.



B
22
S
3
Posts: 451
Reputation: 2,135

Previous

Return to How do I....?

Who is online

Users browsing this forum: amarcelo, Magistross, PavleNikolic and 23 guests