https://sureai.net/forum/viewtopic.php?t=603
scn TrapRottenPlank01SCRIPT
short doonce
float timer
begin onactivate
if doonce == 0
if ( GetDistance Player < 120)
playgroup Forward, 1
set doonce to 1
set timer to 1.5
endif
endif
if doonce == 1 && timer <= 0
if ( GetDistance Player < 60)
playgroup Unequip, 1
set doonce to 2
endif
endif
if timer > 0
set timer to timer - getSecondsPassed
endif
end
begin onReset
reset3DState
set doonce to 0
set timer to 0
end