I have got so far without any help and now here i am, asking for help.... disapointed...
anyway i am rather stuck and clueless here, as you can see below i can alot of Objects, they are all markers but want i want to do only have one output, meaning depending on what the global's value is it teleports the player to corrosponding number, don't worry the global is set by a different script which is working fine, as you can see, the code below is one of my attempts to do it, i did have another way with was tidier but it didn't work, neither does this, all it says to me when its compiled is; 'too many arguments passed to function' which to me doesn't make sense seeing as in my other script is basicaly the same...
i was thinking of having the teleport as a sperate function like this
Function Teleport()
player.MoveTo(Dest)
endFunction
and having the global ifs like
if(RuneTeleportDest.GetValue(0))
Dest = DawnstarRuneMarker
ect....
but i didn't know how to set it out properly.
{A Script that finds the player within itself and teleports according to a global value}import utilityimport gameGlobalVariable Property RuneTeleportDest AutoObjectReference player;player = game.getPlayer()ObjectReference Property DawnstarRuneMarker Auto ; 0ObjectReference Property FalkreathRuneMarker Auto ; 1ObjectReference Property MarkarthRuneMarker Auto ; 2ObjectReference Property MorthalRuneMarker Auto ; 3ObjectReference Property RiftenRuneMarker Auto ; 4ObjectReference Property SolitudeRuneMarker Auto ; 5ObjectReference Property WhiterunRuneMarker Auto ; 6ObjectReference Property WindhelmRuneMarker Auto ; 7ObjectReference Property WinterholdRuneMarker Auto ; 8ObjectReference Property MagniIslandRuneMarker Auto ; 9;************************************auto State waiting Event onTriggerEnter(objectReference triggerRef) Actor actorRef = triggerRef as Actor ; check whether we care if the player is activating if(actorRef == game.getPlayer()) if(RuneTeleportDest.GetValue(0)) player.MoveTo(DawnstarRuneMarker) Elseif(RuneTeleportDest.GetValue(1)) player.MoveTo(FalkreathRuneMarker) Elseif(RuneTeleportDest.GetValue(2)) player.MoveTo(MarkarthRuneMarker) Elseif(RuneTeleportDest.GetValue(3)) player.MoveTo(MorthalRuneMarker) Elseif(RuneTeleportDest.GetValue(4)) player.MoveTo(RiftenRuneMarker) Elseif(RuneTeleportDest.GetValue(5)) player.MoveTo(SolitudeRuneMarker) Elseif(RuneTeleportDest.GetValue(6)) player.MoveTo(WhiterunRuneMarker) Elseif(RuneTeleportDest.GetValue(7)) player.MoveTo(WindhelmRuneMarker) Elseif(RuneTeleportDest.GetValue(8)) player.MoveTo(WinterholdRuneMarker) Elseif(RuneTeleportDest.GetValue(9)) player.MoveTo(MagniIslandRuneMarker) endif endif endEventendStateThanks
