mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AICSAR
* Added FSM Event "HeloOnDuty"
This commit is contained in:
parent
07cdc36181
commit
7367e15121
@ -22,7 +22,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
-- ### Author: **Applevangelist**
|
-- ### Author: **Applevangelist**
|
||||||
-- Last Update February 2022
|
-- Last Update July 2023
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
-- @module Functional.AICSAR
|
-- @module Functional.AICSAR
|
||||||
@ -191,7 +191,7 @@
|
|||||||
-- @field #AICSAR
|
-- @field #AICSAR
|
||||||
AICSAR = {
|
AICSAR = {
|
||||||
ClassName = "AICSAR",
|
ClassName = "AICSAR",
|
||||||
version = "0.1.14",
|
version = "0.1.15",
|
||||||
lid = "",
|
lid = "",
|
||||||
coalition = coalition.side.BLUE,
|
coalition = coalition.side.BLUE,
|
||||||
template = "",
|
template = "",
|
||||||
@ -397,6 +397,7 @@ function AICSAR:New(Alias,Coalition,Pilottemplate,Helotemplate,FARP,MASHZone)
|
|||||||
self:AddTransition("*", "PilotRescued", "*") -- Pilot Rescued
|
self:AddTransition("*", "PilotRescued", "*") -- Pilot Rescued
|
||||||
self:AddTransition("*", "PilotKIA", "*") -- Pilot dead
|
self:AddTransition("*", "PilotKIA", "*") -- Pilot dead
|
||||||
self:AddTransition("*", "HeloDown", "*") -- Helo dead
|
self:AddTransition("*", "HeloDown", "*") -- Helo dead
|
||||||
|
self:AddTransition("*", "HeloOnDuty", "*") -- Helo spawnd
|
||||||
self:AddTransition("*", "Stop", "Stopped") -- Stop FSM.
|
self:AddTransition("*", "Stop", "Stopped") -- Stop FSM.
|
||||||
|
|
||||||
self:HandleEvent(EVENTS.LandingAfterEjection,self._EventHandler)
|
self:HandleEvent(EVENTS.LandingAfterEjection,self._EventHandler)
|
||||||
@ -473,6 +474,14 @@ function AICSAR:New(Alias,Coalition,Pilottemplate,Helotemplate,FARP,MASHZone)
|
|||||||
-- @param #string Event Event.
|
-- @param #string Event Event.
|
||||||
-- @param #string To To state.
|
-- @param #string To To state.
|
||||||
|
|
||||||
|
--- On after "HeloOnDuty" event.
|
||||||
|
-- @function [parent=#AICSAR] OnAfterHeloOnDuty
|
||||||
|
-- @param #AICSAR self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param Wrapper.Group#GROUP Helo Helo group object
|
||||||
|
|
||||||
--- On after "HeloDown" event.
|
--- On after "HeloDown" event.
|
||||||
-- @function [parent=#AICSAR] OnAfterHeloDown
|
-- @function [parent=#AICSAR] OnAfterHeloDown
|
||||||
-- @param #AICSAR self
|
-- @param #AICSAR self
|
||||||
@ -853,6 +862,11 @@ function AICSAR:_GetFlight()
|
|||||||
local newhelo = SPAWN:NewWithAlias(self.helotemplate,self.helotemplate..math.random(1,10000))
|
local newhelo = SPAWN:NewWithAlias(self.helotemplate,self.helotemplate..math.random(1,10000))
|
||||||
:InitDelayOff()
|
:InitDelayOff()
|
||||||
:InitUnControlled(true)
|
:InitUnControlled(true)
|
||||||
|
:OnSpawnGroup(
|
||||||
|
function(Group)
|
||||||
|
self:__HeloOnDuty(1,Group)
|
||||||
|
end
|
||||||
|
)
|
||||||
:Spawn()
|
:Spawn()
|
||||||
|
|
||||||
local nhelo=FLIGHTGROUP:New(newhelo)
|
local nhelo=FLIGHTGROUP:New(newhelo)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user