Jump to content

Making actors run to the player


GrunTella

Recommended Posts

This is my first post to this forum. Am I posting to the right place?

 

 

What is the best way to get an actor to run to the player?

 

Since AITravel doesn't take variables, you can't use that.

 

"AIActivate player" works until the actor gets close then they run around in circles wherever the player was when the command was issued. Also you have to add "ForceRun" to make them run.

 

"StartCombat player" works and is better than AIActivate in finding a path to the player, but then you have to turn off the combat/fight before the actor actually fights the player. I haven't yet tested if spell casters and marksmen attack the player from a distance. Also, stopping combat and resetting fight makes the actor run back to wherever they were before the combat started.

 

"AIFollow player 0 0 0 0" works, but only if the actor can actually see the player.

 

At the moment, the best method (assuming no distance attacks) is something like:

StartCombat player

If ( GetDistance player < 500 )

StopCombat player

SetFight 30

AIWander 0 0 0 0

AIFollow player 0 0 0 0

StopScript <this script>

endif

 

I can foresee some problems with the above and wonder if anyone knows a better way.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...