How do I use MoveTo correctly?

Post » Thu Jan 09, 2014 7:30 am

I want to move 2 actors to another location when 1 of them enters a triggerbox. I haven't used MoveTo before but I scripted using the same principals and the Wiki as a guide. I think the Wiki is way off here. I have a xmarkerheading for Actor1 to move to and Actor2 will move to a chair. Please can somebody check my failed script. Thanks.

Actor Property Actor1 AutoActor Property Actor2 AutoObjectReference Property Dest1 AutoObjectReference Property Dest2 AutoEvent OnTriggerEnter(ObjectReference akactionref)If akactionref == Actor1Actor1.Disable()Actor2.Disable()Actor1 Moveto(Dest1)Actor2 Moveto(Dest2)EndifEndevent
User avatar
Amber Hubbard
 
Posts: 3537
Joined: Tue Dec 05, 2006 6:59 pm

Post » Wed Jan 08, 2014 10:58 pm

Actor Property Actor1 AutoActor Property Actor2 AutoMarker Property YourMarkerDest1 AutoMarker Property YourMarkerDest2 AutoEvent OnTriggerEnter(ObjectReference akactionref)     If akactionref == Actor1          Actor1.Disable()          Actor2.Disable()          Actor1.Moveto(YourMarkerDest1)          Actor2.Moveto(YourMarkerDest2)     EndifEndevent

You won't see the moved ObjRef though, because you previously disabled it...try...

Int DistToActor = YourMarkerDest1.GetDistance(Actor1) as IntDebug.Messagebox("I am " + DistToActor " units away from " + YourMarkerDest1)

...to verifie it's close to each other after moved to the dest.

User avatar
GLOW...
 
Posts: 3472
Joined: Thu Aug 03, 2006 10:40 am

Post » Wed Jan 08, 2014 9:53 pm

Damn, I was a "." away from a good script. When the actors have moved they will be enabled later in the quest. Thanks.

User avatar
Sxc-Mary
 
Posts: 3536
Joined: Wed Aug 23, 2006 12:53 pm


Return to V - Skyrim