Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
862 B
45 lines
862 B
3 years ago
|
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
|