So I have been working on the "baddies" movement system. It is a basic chase system, however it moves through everything with no problems. I could use some help making it move around my backdrops.
For the chase system I use the Advance Direction Object.
I have tryed to flag the movements based on collisions but it just makes the baddie go all stupid like. So maby my code is flawed, but I need to get the movement to react to distance/and objects. If it helps I will post the code I currently have. I dont need anything fancy, this will be mostly drone movements.
A method which may also work would be to make bad guys chase the player, and have a small 'line of sight' detector, constantly firing between enemy and player.
If suddenly it loses sight of the player, it draws a line between the player and plots a midpoint where the wall colision happened. That midpoint moves away (left or right), creating a bézier curve. Detectors are placed along the curve and check if they no longer overlap an obstacle.
If not, then the bad guy will follow the curve, thereby walking around the obstacle.
You could do similar, but not use a bézier curve, just straight lines. Add a mid-point and move it outwards to test left adn right.
You could create a 'node' object which gets left behind the player. It always checks the distance between the player and the newest node, and if that distance is greater than a certain amount, a new node is generated.
Nodes older than a certain amount are destroyed.
When the badguy loses sight of the player, he borrows a big detector quickly which will check for nodes that are nearby. Starting with the newest, he tests to see if obstacles are between him and it. When he finds a clear line of sight, he runs to that node and just follows them down until he sees the player again.
(ps. please excuse the bad typing, I'm not wearing my glasses, LOL)