clockout1 Posted January 30, 2010 Posted January 30, 2010 I am trying to make an activator that teleports the player to an XMarker. I have written this simple script. Scn StoneTeleport short triggered Begin OnActivate if triggered = 1 MoveToMarker LooseStone01 set triggered 0 endif end When I hit save, I get the message "line 7, expression error: SYNTAX" Can someone tell me why?
Argomirr Posted January 30, 2010 Posted January 30, 2010 You forgot a "=" on line 7. :) An easy fix:Scn StoneTeleport short triggered Begin OnActivate if triggered == 1 MoveToMarker LooseStone01 set triggered 0 endif end [EDIT]Oh, you're trying to move the player, right? What you've got now will move the activator instead of the player because you haven't put a reference in the MoveTo command. It should be like this:Scn StoneTeleport Begin OnActivate if IsActionRef player == 1 PlayerRef.MoveToMarker LooseStone01 endif endThe IsActionRef check makes sure the player isn't moved if an NPC activates the thing. And why the triggered variable?
Recommended Posts