I am trying to make a stealth map, where there are some soldiers patrolling, the user should avoid walking in front of these soldiers.
For example, this event walks in a left-right cycle and should trigger when the player walks inside this area.
I could do a parallel process every second with a condition like this:
There is any easier way to do it?
For example, this event walks in a left-right cycle and should trigger when the player walks inside this area.
I could do a parallel process every second with a condition like this:
Code:
if( eventX+eventY<=playerX+PlayerY)
if( eventX-eventY>=playerX-PlayerY)
if( eventX-eventY<=playerX-PlayerY+8)
if( eventX+eventY>=playerX+PlayerY-8)
doSomething...
There is any easier way to do it?