enderalse/source/scripts/_00e_goldfurtbuttonscript.psc

42 lines
834 B
Plaintext

ScriptName _00E_GoldfurtButtonScript extends objectReference
; written by Julian "Sagantor"
Actor Property playerRef Auto
{Let it autofill in the CK}
ObjectReference Property wall1 Auto
ObjectReference Property wall2 Auto
Sound Property movingWallsSound Auto
bool doOnce
auto STATE active
EVENT onActivate( objectReference ref )
if( ref == playerRef && doOnce == false )
playAnimation("down")
gotoState("inactive")
moveWalls()
playAnimation("up")
gotoState("active")
doOnce = true
EndIf
endEVENT
endSTATE
STATE inactive
; do nothing in this state
endSTATE
Function moveWalls()
wall1.TranslateTo( 3512.0000, 2552.0000, 313.3433, 0.0000, -0.0000, 90.0000, 50.0 )
wall2.TranslateTo( 3512.0000, 2784.0000, 313.3433, 0.0000, -0.0000, 270.0000, 50.0 )
movingWallsSound.Play( Self )
EndFunction