Sorry title is a bit vague. I have a basic level set up in which has rooms in which guards a "patrolling" (what's actually going on is guards a moving from left to right or vice versa until they hit a wall and simply start moving in the opposite direction). What I've been trying to do is make the patrols in such a way that when a guard gets to a wall at the end of a room, rather than immediately turning around and continuing to move (in a way that makes it look like the guard has just bounced off the wall like a tennis ball), the guard actually stops at before the (like 16 pixels) away from the wall for 2 seconds before turning around and starting to again. Ala "more realistically guard patrols".
The concept sounds simple enough, and I'm sure the more realistic of you would know how to do this, but I've failed to do it well. I say failed to do it well because I have tried it but my method doesn't run so well, at any random time between 10-300 seconds, the guard will glitch and start turning left, right, then right, then left, etc, for a good 10 seconds or so.
What complicates things is the need for guards to stop at a distance from the wall. Ideally I'd have simply have put an on collision with " wall" action > set patrol to false > wait 2 seconds > change direction > set patrol to true. But that'll have the enemies waiting literally face-on-wall waiting for 2 seconds. So that won't work. So I have to use the overlapping at offset conditions. But this command triggers and continues triggering while enemy is within that offset of the wall. I tried adding a trigger once which so of solved my problem, but lead to this curious bug.
May someone show me how to do this?
NB sorry I can't upload a capx or screenshot at the moment