XaselmGasEmitter01SCRIPT
Editor ID:XaselmGasEmitter01SCRIPT
Form ID:00052764
Type:Object
Script:scn XaselmGasEmitter01SCRIPT
; spurt gas on activation
short init
float timer
short next
ref mySelf
ref myParent
float fTrapDamage
float fLevelledDamage
float fTrapPushBack
float fTrapMinVelocity
short bTrapContinuous
begin onActivate
if init == 0
set mySelf to getSelf
set myParent to getParentRef
set init to 1
endif
if isActionRef player == 0 && isActionRef mySelf == 0
set init to 2
; set up the damage values
set fTrapDamage to 10
set fTrapPushBack to 0
set fLevelledDamage to 0.125
set fTrapMinVelocity to 20
set bTrapContinuous to 0
set timer to 3
;messagebox "set timer"
set next to 1
playgroup forward 1
endif
end
begin gameMode
;daisy-chain
if next == 1 && timer <=0
set next to 0
myParent.activate mySelf 1
;messagebox "timer less than zero"
endif
if timer <= 0 && init == 2
playgroup forward 1
set timer to 22
endif
if timer > 0
set timer to timer - getSecondsPassed
endif
end