Help with OnOpen Teleport script please.

Post » Wed May 20, 2015 12:36 am

Actor Property PlayerRef AutoObjectReference Property TeleDest autoEvent OnOpen(ObjectReference akActionRef)	If(akActionRef == PlayerRef)                         Game.GetPlayer().MoveTo(TeleDest)EndIf         EndEvent

I'm running this script on a cave secret door (the one that slides upwards to open) but it isn't teleporting the player. The player hits a switch to open the door and when the door's animation has finished opening player should be teleported. What am I missing/doing wrong. I managed to do this years ago successfully - now I must be dumber.

User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Wed May 20, 2015 3:40 am

Is your TeleDest properly set?

Also, you declared Actor Property for the player and OnOpen refers to ObjectReference.

Try to use directly if(game.getplayer() == akActionRef)

User avatar
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am


Return to V - Skyrim