Aller au contenu

Photo

Trouble with ActionMoveToLocation() and ActionForceMoveToLocation()


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I can't get them to work properly in the Action Queue.  When I use ActionMoveToObject() or ActionForceMoveToObject() in my script, everything happens in the right order.  If I use ActionMoveToObject(), no movement occurs.  Does anyone have any tips on making ActionMoveToLocation() work more effectively?

#2
Dann-J

Dann-J
  • Members
  • 3 161 messages
Some actions don't queue nicely and try to override each other, so that the last action queued happens first and prevents those before it from happening at all. You may have to build in a delay to get things to happen in the right order.

If you're moving in a straight line, then you can calculate the time it will take based on the distance between the start and end point, and the current speed of the creature in question. I have a run-and-hide script in Isle of Shrines that does this, and delays the creature becoming script-hidden until it reaches its destination. The downside is that if you bump into them and delay them, then they disappear slightly before getting to their target location.

Modifié par DannJ, 13 novembre 2011 - 11:05 .


#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Unfortunately this is all going into an AI script that has to be flexible. Fortunately I found a work-around with ActionMoveToObject().