falloutperson416 Posted July 27, 2012 Share Posted July 27, 2012 (edited) So, I've got this script that is basically used to teleport the player to different x marker headings. The problem is, MoveTo on its own doesn't work, I need to move the player to the x marker. Player.MoveTo fails to compile, any help? Scriptname IHTeleportationScript extends ObjectReference {Teleports the player to vanilla houses} ObjectReference Property IHBreezehomeREF auto ObjectReference Property IHHoneysideREF auto ObjectReference Property IHVlindrelHallREF auto ObjectReference Property IHHjerimREF auto ObjectReference Property IHProudspireManorREF auto ObjectReference Property PlayerREF Message Property IHTeleMessage auto Message Property IHTeleMessage2 auto Message Property IHTeleMessage3 auto Message Property IHTeleMessage4 auto Message Property IHTeleMessage5 auto Message Property IHTeleMessage6 auto int count Event OnActivate (ObjectReference akActionRef) int Button Button = IHTeleMessage.Show() if Button == 0 ; button 1 pressed elseif Button == 1 ; button 2 pressed player.MoveTo (IHBreezehomeREF) IHTeleMessage2.Show() elseif Button == 2 ; button 3 pressed player.MoveTo (IHHoneysideREF) IHTeleMessage3.Show() elseif Button == 3 ; button 4 pressed player.MoveTo (IHVlindrelHallREF) IHTeleMessage4.Show() elseif Button == 4 ; button 5 pressed player.MoveTo (IHHjerimREF) IHTeleMessage5.Show() elseif Button == 5 ; button 6 pressed player.MoveTo (IHProudspireManorREF) IHTeleMessage6.Show() endif EndEvent Edited July 27, 2012 by falloutperson416 Link to comment Share on other sites More sharing options...
gasti89 Posted July 27, 2012 Share Posted July 27, 2012 2 things (1 i'm not sure about) - try deleting the space between MoveTo and the parameters (not sure) - you can't call "player". You must call Game.GetPlayer() or PlayerREF (since you defined it as a property) Link to comment Share on other sites More sharing options...
gsmanners Posted July 27, 2012 Share Posted July 27, 2012 Another thing about MoveTo is that it doesn't advance the game clock, so you'll want to have a look at WaitGameTime. Link to comment Share on other sites More sharing options...
gasti89 Posted July 27, 2012 Share Posted July 27, 2012 Well, teleport should be an instant moving from one place to another. So i think it's fine to not let the time pass as you would fast travel. Link to comment Share on other sites More sharing options...
gsmanners Posted July 27, 2012 Share Posted July 27, 2012 Maybe. I could be wrong about how that function works. Might want to look into FastTravel, as well. Link to comment Share on other sites More sharing options...
Scarlex Posted July 29, 2012 Share Posted July 29, 2012 (edited) You want to word it like this: Game.Getplayer() can't come from nowhere. The workaround is pointing at the activator and identifying the actor as the player. Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() If (Button == 1) ; button 2 pressed akActionRef.MoveTo (IHBreezehomeREF)* ElseIf ; End the interraction EndIf EndIf EndEvent Hope this helps :) Edited July 29, 2012 by Scarlex Link to comment Share on other sites More sharing options...
steve40 Posted July 30, 2012 Share Posted July 30, 2012 Like Gasti said, your player property is "PlayerREF" not "player". Scriptname IHTeleportationScript extends ObjectReference {Teleports the player to vanilla houses} ObjectReference Property IHBreezehomeREF auto ObjectReference Property IHHoneysideREF auto ObjectReference Property IHVlindrelHallREF auto ObjectReference Property IHHjerimREF auto ObjectReference Property IHProudspireManorREF auto ObjectReference Property PlayerREF Message Property IHTeleMessage auto Message Property IHTeleMessage2 auto Message Property IHTeleMessage3 auto Message Property IHTeleMessage4 auto Message Property IHTeleMessage5 auto Message Property IHTeleMessage6 auto int count Event OnActivate (ObjectReference akActionRef) int Button Button = IHTeleMessage.Show() if Button == 0 ; button 1 pressed elseif Button == 1 ; button 2 pressed PlayerREF.MoveTo (IHBreezehomeREF) IHTeleMessage2.Show() elseif Button == 2 ; button 3 pressed PlayerREF.MoveTo (IHHoneysideREF) IHTeleMessage3.Show() elseif Button == 3 ; button 4 pressed PlayerREF.MoveTo (IHVlindrelHallREF) IHTeleMessage4.Show() elseif Button == 4 ; button 5 pressed PlayerREF.MoveTo (IHHjerimREF) IHTeleMessage5.Show() elseif Button == 5 ; button 6 pressed PlayerREF.MoveTo (IHProudspireManorREF) IHTeleMessage6.Show() endif EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts