Account
News
Downloads
Community
Wiki
Walkthrough

ARCAVEINTRAPSCRIPT01

Editor ID:
ARCAVEINTRAPSCRIPT01


Form ID:
00007F31


Typ:
Objekt


Script:
scriptName ARCAVEINTRAPSCRIPT01

; On activation rocks will come tumbling down and do some damage
; Damage stops after 6 seconds

short triggered
float timer
short next
ref mySelf
ref myParent
float fTrapDamage
float fLevelledDamage
float fTrapPushBack
float fTrapMinVelocity
short bTrapContinuous

begin onActivate

if triggered == 0
set fTrapDamage to 20
set fTrapPushBack to 300
set fLevelledDamage to 1.5
set fTrapMinVelocity to 150
set bTrapContinuous to 0
playgroup unequip 1
enableLinkedPathPoints
set triggered to 1
set timer to 6
setDestroyed 1
triggerHitShader 4
endif

end

begin gameMode

;after 1 sec delay, activate parent (for daisy-chaining)
if triggered == 1 && next == 0 && timer < 5
set next to 1
set myParent to getParentRef
set mySelf to getSelf
myParent.activate mySelf 1
endif

if triggered == 1 && timer <= 0
set fTrapDamage to 0
set fTrapPushBack to 0
set triggered to 2
endif

if timer > 0
set timer to timer - getSecondsPassed
endif

end

begin onReset

reset3DState
set triggered to 0
setDestroyed 0
enableLinkedPathPoints

end


Mit der Nutzung dieser Website erklären Sie sich damit einverstanden, dass wir Cookies verwenden. Weitere Informationen hierzu finden Sie in unserer Datenschutzerklärung.
OK