XirethardSecretDoor01SCRIPT
Editor ID:XirethardSecretDoor01SCRIPT
Form ID:00053119
Typ:Objekt
Script:scriptName XirethardSecretDoor01SCRIPT
short init
short busy
short open
short next
float timer
ref mySelf
ref myParent
begin onActivate
set mySelf to getSelf
set myParent to getParentRef
if isActionRef player == 0 && isActionRef myself == 0 && busy == 0
if open == 0
Xirethard02SecretBlack01REF.disable
playgroup forward 0
Xirethard02SecretDust01REF.playgroup forward 1
set open to 1
enableLinkedPathPoints
else
playgroup backward 1
Xirethard02SecretDustFall01REF.playgroup forward 1
set open to 0
disableLinkedPathPoints
endif
set next to 1
set busy to 1
set timer to 1
endif
end
begin gameMode
if init == 0
; set up ref vars
set mySelf to getSelf
set myParent to getParentRef
; prepare linked pathsgrid points
disableLinkedPathPoints
set init to 1
endif
; daisy-chain activation
if next == 1 && timer <=0
set next to 0
myParent.activate mySelf 1
endif
if isAnimPlaying == 0 && busy == 1
set busy to 0
endif
if timer > 0
set timer to timer - getSecondsPassed
endif
end
; begin onReset
; reset3DState
; set open to 0
; set next to 0
; set busy to 0
; disableLinkedPathPoints
; end