Jump to content

Actors: moveTo acting oddly


Kanraga

Recommended Posts

Hi all,

 

I'm running a quest script that periodically moves an NPC to the Imperial city prison, inside a cell, which is then locked. The Xmarker to which I am moving the actor is located a fair distance from the door, and the actor's "jail" package comes into play before the actor is even moved. Theoretically, there should be no reason for the actor to somehow end up standing right outside the cell, and yet every time I check up on it, it's standing on the wrong side of the door.

 

Snippet of script:

 

set ActorPrison to 1

set APP.numTimesJailed to APP.numTimesJailed + 1

 

APPActorRef.evp //starts jail package

APPActorRef.moveTo APPPrisonRef //moved into the cell

APPPrisonDoorRef.lock 100 //door locked

 

Am I calling things in the wrong order or something? Any assistance would be appreciated.

 

-Kanraga

Link to comment
Share on other sites

Hi, i've done something like you did, moving NPCs but with noPackage, to cells with MoveTo.

 

And i got EXACTLY the same problem : they were sometimes out of the cell, no reason why.

 

One thing you can do is to move them back if they get too far from the cell.

 

if ( APPActorRef.GetDistance APPPrisonRef > 100 )

APPActorRef.MoveTo APPPrisonRef

endif

 

The distance must be very short, if the APPPrisonRef is not far from the cell door.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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