Académique Documents
Professionnel Documents
Culture Documents
;
;
;This is the script for the blade trap
;Activating the trap causes it to toggle on and off
;If activated while in the process of stopping, it should be able to handle that.
;================================================================
import debug
import utility
;-----------------------------------
Function fireTrap()
; ;debug.TRACE("Looping =")
; ;debug.TRACE(Loop)
;Trap Guts
while(finishedPlaying == False) && isloaded
;TRACE("playing anim Trigger")
hitBase.goToState("CanHit")
PlayAnimationAndWait("Trigger", "BackSwing")
hitBase.goToState("CannotHit")
unregisterForAnimationEvent(self, "reset")
goToState("Reset")
; ;debug.TRACE("fireTrap has finished")
PlayAnimationAndWait( "reset", "off" )
endFunction
Function ResetLimiter()
finishedPlaying = False
;TrapHitBase hitBase = (self as objectReference) as TrapHitBase
;hitBase.goToState("CanHit")
EndFunction
Event onLoad()
hitBase = (self as objectReference) as TrapHitBase
endEvent
endEvent