enderalse/source/scripts/_00e_mq13c_sc07_turretscript.psc

45 lines
862 B
Plaintext

scriptName _00E_MQ13c_SC07_TurretScript extends ReferenceAlias
;-- Properties --------------------------------------
_00E_MQ13c_SC07_TurretSC Property MQ13c_SC07_TurretBoxREF Auto
_00E_MQ13c_Functions Property MQ13c Auto
function StopFiring()
GotoState("defaultState")
endFunction
function FireTurret()
if !MQ13c.MQ13c_SC07_PlayerInSafeZone
MQ13c.FireBolt01()
utility.Wait(2 as Float)
MQ13c.FireBolt02()
utility.Wait(2 as Float)
MQ13c.FireBolt03()
elseIf MQ13c_SC07_TurretBoxREF.bPlayerOnSurface
MQ13c.TurretFireAtThePlayer()
endIf
endFunction
state defaultState
Event OnActivate(ObjectReference akActionRef)
GotoState("firing")
EndEvent
endState
state firing
Event OnUpdate()
self.FireTurret()
self.RegisterForSingleUpdate(1.5)
EndEvent
Event onBeginState()
FireTurret()
RegisterForSingleUpdate(1.5)
EndEvent
endState