Jump to content

MoveTo doesn't move player


antstubell

Recommended Posts

As title says. I have checked all properties and they are fine. Player is supposed to move to a xmarkerheading in the same cell for testing purposes but doesn't. Rest of script works fine.

 

Event OnActivate(ObjectReference akActionRef)

Int SoundInstance = SFX.Play(SndMarker)
Utility.Wait(Delay); some sfx have a start up sound
TranslateRef.TranslateTo(PosX1, PosY1, posZ1, RotX1, RotY1, RotZ1, SpeedVal, RotationVal)
Utility.Wait(Time)
akActionRef.MoveTo(MovToRef)
Sound.StopInstance(SoundInstance)

debug.notification("Moving Player")

EndEvent

 

 

Link to comment
Share on other sites

Yes, player will be moved to an interior cell. Should I test this way?

 

EDIT: Yet thid works perfectly...

 

Actor Property PlayerREF Auto
ObjectReference Property MovToRef Auto

Event OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == PlayerRef
PlayerRef.MoveTo(MovToRef)

EndIf
EndEvent

 

Edited by antstubell
Link to comment
Share on other sites

I've seen the error of my... script. The script is placed on a link marker activator and activated by a pull chain. So akActionRef.MoveTo(MovToRef) is attempting to move the marker. I added Actor Property PlayerREF and changed the line to PlayerRef.MoveTo(MovToRef) and all now works.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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