Hi everyone im working on a script and im a bit stuck, any help would be greatly appreciated.
The purpose of my script is to move a static object from point a1 to point b2 at a steady speed and then move back from point b to a on activation of a button.
The script below works but only lets me move the object to point b2 on activation, i need it then to move back from point b2 to point a1 on second activation. like a light switch.
Heres The Script.
ObjectReference Property ITEMTOANIMATE Auto
ObjectReference Property WALLUP Auto
ObjectReference Property WALLDOWN Auto
Sound Property MOVEMENTSOUND Auto
Event OnActivate(ObjectReference akActionRef)
GoToState("Idle")
ITEMTOANIMATE.TranslateToRef(WALLDOWN, 2000, 0.0)
EndEvent
State Idle
Event OnActivate(ObjectReference akActionRef)
If (akActionRef == Game.GetPlayer())
GoToState("Inactive")
MOVEMENTSOUND.Play(WALLUP)
ITEMTOANIMATE.TranslateToRef(WALLUP, 25.0, 0.0)
EndIf
EndEvent
EndState
The way this script works is with 1 static object (wall for example) then a switch (impbutton) and 2 unique xmarkers.
the script is attatched to the button and on activation it moves the wall from 1 point to another in relativity to the position of the xmarkers.
i didnt write all the script myself and dont fully understand the syntax but i can tell by looking at it that it just needs a slight tweak,one again any assistance would be a big help.
Thanks For Reading