scriptName _00E_MQ01_TrapDweBallistaDam extends TrapBase ; ;Dart Trap extending TrapBase ;integrated with the TrapTriggerBase ; ;================================================================ ; SE: Removed unused lines, causing errors in the log import debug import utility import custom Actor property enemy1 auto Actor property enemy2 auto Function initialize() endFunction Function fireTrap() playAnimation("TriggerAll") ;fire all WaitForAnimationEvent("FTransAll") ; A failsafe to ensure that at least one spider has been dealt with, ; as their slightly random positioning on the cell's navmesh makes ; this not easy to predict. utility.wait(2) if (enemy1.isDead() == 0) if (enemy2.isDead() == 0) ; If the spiders are on the ground floor, it's the player's ; fault. if (enemy1.getPositionZ() > -1200) enemy1.kill() elseif (enemy2.getPositionZ() > -1200) enemy2.kill() endif endIf endIf goToState("Reset") endFunction State Reset Event OnBeginState() TrapDisarmed = True GoToState ("Disabled") endEvent Event OnActivate( objectReference activateRef ) ;TRACE("Reset trigger") EndEvent endState