I am working on a script for melee enemies.
Since attacking the player is always done with
rotatetoplr,movefore=x they tend to get stuck at doorframes or other obstacles as the enemy AI appearantly has no pathfinding.
I tried to work around with this with
followplr but it works very unreliable. And if it works, it seems the enemies are at walk speed only. I know of
ifplrtrail but have no idea when the engine decides that the player left a trail.
I also tried to call
waypointstart when
plrcannotbeseen=1 to *unstuck* enemies, but it doesn't work at all:
Sometimes they run against the wall obviously trying to get to the waypoint on the other side if it is the nearest and if they actually reach a wapoint, then they stop right there - it seems they don't start to use
waypointstate again, once
waypointstop is called, even if
waypointstart is called again
So my questions are:
a)
Can anybody shed some light onto the
followplr command regarding how the engine decides, that there is a trail,and in which way that trail resembles the actual player movement?
b)
Is there a way to get an enemy, who's script called the
waypointstop command to check for
waypointstate again, and start to walk waypoints again within the same script?
In case you find my grammar and spelling weird ---> native German speaker ^^