mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into Airbase-Guard
# Conflicts: # Moose Development/Moose/Base.lua # Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua # Moose Mission Setup/Moose.lua # Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz # Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz # Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz # Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz # Moose Test Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz # Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz # Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz # Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz # Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz # Moose Test Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz # Moose Test Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz # Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz # Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz # Moose Test Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz # Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz # Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
This commit is contained in:
commit
ff44c70ea4
@ -331,9 +331,8 @@ function BASE:SetState( Object, StateName, State )
|
||||
if not self.States[ClassNameAndID] then
|
||||
self.States[ClassNameAndID] = {}
|
||||
end
|
||||
|
||||
self.States[ClassNameAndID][StateName] = State
|
||||
self:E( { "SetState " .. ClassNameAndID .. "." .. StateName, State } )
|
||||
self:E( { ClassNameAndID, StateName, State } )
|
||||
|
||||
return self.States[ClassNameAndID][StateName]
|
||||
end
|
||||
@ -341,9 +340,11 @@ end
|
||||
function BASE:GetState( Object, StateName )
|
||||
|
||||
local ClassNameAndID = Object:GetClassNameAndID()
|
||||
self:E( { ClassNameAndID } )
|
||||
if self.States[ClassNameAndID] then
|
||||
self:E( { " GetState " .. ClassNameAndID .. "." .. StateName, self.States[ClassNameAndID][StateName] } )
|
||||
return self.States[ClassNameAndID][StateName]
|
||||
local State = self.States[ClassNameAndID][StateName]
|
||||
self:E( { ClassNameAndID, StateName, State } )
|
||||
return State
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -422,7 +423,10 @@ function BASE:F( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
|
||||
end
|
||||
|
||||
if _TraceAll == true or _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName].Method[Function] then
|
||||
local LineCurrent = DebugInfoCurrent.currentline
|
||||
local LineCurrent = 0
|
||||
if DebugInfoCurrent.currentline then
|
||||
LineCurrent = DebugInfoCurrent.currentline
|
||||
end
|
||||
local LineFrom = 0
|
||||
if DebugInfoFrom then
|
||||
LineFrom = DebugInfoFrom.currentline
|
||||
@ -476,7 +480,10 @@ function BASE:_T( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
|
||||
end
|
||||
|
||||
if _TraceAll == true or _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName].Method[Function] then
|
||||
local LineCurrent = DebugInfoCurrent.currentline
|
||||
local LineCurrent = 0
|
||||
if DebugInfoCurrent.currentline then
|
||||
LineCurrent = DebugInfoCurrent.currentline
|
||||
end
|
||||
local LineFrom = 0
|
||||
if DebugInfoFrom then
|
||||
LineFrom = DebugInfoFrom.currentline
|
||||
|
||||
@ -54,9 +54,6 @@ DATABASE = {
|
||||
ClientsByName = {},
|
||||
ClientsByID = {},
|
||||
},
|
||||
DCSUnits = {},
|
||||
DCSGroups = {},
|
||||
DCSStatics = {},
|
||||
UNITS = {},
|
||||
STATICS = {},
|
||||
GROUPS = {},
|
||||
@ -125,10 +122,13 @@ end
|
||||
|
||||
--- Adds a Unit based on the Unit Name in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:AddUnit( DCSUnit, DCSUnitName )
|
||||
function DATABASE:AddUnit( DCSUnitName )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = DCSUnit
|
||||
self.UNITS[DCSUnitName] = UNIT:Register( DCSUnitName )
|
||||
if not self.UNITS[DCSUnitName] then
|
||||
self.UNITS[DCSUnitName] = UNIT:Register( DCSUnitName )
|
||||
end
|
||||
|
||||
return self.UNITS[DCSUnitName]
|
||||
end
|
||||
|
||||
|
||||
@ -136,15 +136,16 @@ end
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:DeleteUnit( DCSUnitName )
|
||||
|
||||
self.DCSUnits[DCSUnitName] = nil
|
||||
--self.UNITS[DCSUnitName] = nil
|
||||
end
|
||||
|
||||
--- Adds a Static based on the Static Name in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:AddStatic( DCSStatic, DCSStaticName )
|
||||
function DATABASE:AddStatic( DCSStaticName )
|
||||
|
||||
self.DCSStatics[DCSStaticName] = DCSStatic
|
||||
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
|
||||
if not self.STATICS[DCSStaticName] then
|
||||
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -152,7 +153,7 @@ end
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:DeleteStatic( DCSStaticName )
|
||||
|
||||
self.DCSStatics[DCSStaticName] = nil
|
||||
--self.STATICS[DCSStaticName] = nil
|
||||
end
|
||||
|
||||
--- Finds a STATIC based on the StaticName.
|
||||
@ -181,8 +182,11 @@ end
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:AddClient( ClientName )
|
||||
|
||||
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
|
||||
self:E( self.CLIENTS[ClientName]:GetClassNameAndID() )
|
||||
if not self.CLIENTS[ClientName] then
|
||||
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
|
||||
end
|
||||
|
||||
return self.CLIENTS[ClientName]
|
||||
end
|
||||
|
||||
|
||||
@ -199,10 +203,13 @@ end
|
||||
|
||||
--- Adds a GROUP based on the GroupName in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:AddGroup( DCSGroup, GroupName )
|
||||
function DATABASE:AddGroup( GroupName )
|
||||
|
||||
self.DCSGroups[GroupName] = DCSGroup
|
||||
self.GROUPS[GroupName] = GROUP:Register( GroupName )
|
||||
if not self.GROUPS[GroupName] then
|
||||
self.GROUPS[GroupName] = GROUP:Register( GroupName )
|
||||
end
|
||||
|
||||
return self.GROUPS[GroupName]
|
||||
end
|
||||
|
||||
--- Adds a player based on the Player Name in the DATABASE.
|
||||
@ -261,7 +268,7 @@ function DATABASE:Spawn( SpawnTemplate )
|
||||
SpawnTemplate.SpawnCountryID = SpawnCountryID
|
||||
SpawnTemplate.SpawnCategoryID = SpawnCategoryID
|
||||
|
||||
local SpawnGroup = GROUP:Register( SpawnTemplate.name )
|
||||
local SpawnGroup = self:AddGroup( SpawnTemplate.name )
|
||||
return SpawnGroup
|
||||
end
|
||||
|
||||
@ -400,14 +407,14 @@ function DATABASE:_RegisterGroupsAndUnits()
|
||||
if DCSGroup:isExist() then
|
||||
local DCSGroupName = DCSGroup:getName()
|
||||
|
||||
self:E( { "Register Group:", DCSGroup, DCSGroupName } )
|
||||
self:AddGroup( DCSGroup, DCSGroupName )
|
||||
self:E( { "Register Group:", DCSGroupName } )
|
||||
self:AddGroup( DCSGroupName )
|
||||
|
||||
for DCSUnitId, DCSUnit in pairs( DCSGroup:getUnits() ) do
|
||||
|
||||
local DCSUnitName = DCSUnit:getName()
|
||||
self:E( { "Register Unit:", DCSUnit, DCSUnitName } )
|
||||
self:AddUnit( DCSUnit, DCSUnitName )
|
||||
self:E( { "Register Unit:", DCSUnitName } )
|
||||
self:AddUnit( DCSUnitName )
|
||||
end
|
||||
else
|
||||
self:E( { "Group does not exist: ", DCSGroup } )
|
||||
@ -441,8 +448,8 @@ function DATABASE:_RegisterStatics()
|
||||
if DCSStatic:isExist() then
|
||||
local DCSStaticName = DCSStatic:getName()
|
||||
|
||||
self:E( { "Register Static:", DCSStatic, DCSStaticName } )
|
||||
self:AddStatic( DCSStatic, DCSStaticName )
|
||||
self:E( { "Register Static:", DCSStaticName } )
|
||||
self:AddStatic( DCSStaticName )
|
||||
else
|
||||
self:E( { "Static does not exist: ", DCSStatic } )
|
||||
end
|
||||
@ -462,8 +469,8 @@ function DATABASE:_EventOnBirth( Event )
|
||||
self:F2( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
self:AddUnit( Event.IniDCSUnit, Event.IniDCSUnitName )
|
||||
self:AddGroup( Event.IniDCSGroup, Event.IniDCSGroupName )
|
||||
self:AddUnit( Event.IniDCSUnitName )
|
||||
self:AddGroup( Event.IniDCSGroupName )
|
||||
self:_EventOnPlayerEnterUnit( Event )
|
||||
end
|
||||
end
|
||||
@ -476,7 +483,7 @@ function DATABASE:_EventOnDeadOrCrash( Event )
|
||||
self:F2( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
if self.DCSUnits[Event.IniDCSUnitName] then
|
||||
if self.UNITS[Event.IniDCSUnitName] then
|
||||
self:DeleteUnit( Event.IniDCSUnitName )
|
||||
-- add logic to correctly remove a group once all units are destroyed...
|
||||
end
|
||||
@ -558,19 +565,6 @@ function DATABASE:ForEach( IteratorFunction, arg, Set )
|
||||
end
|
||||
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each **alive** unit, providing the DCSUnit and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive unit in the database. The function needs to accept a DCSUnit parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachDCSUnit( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.DCSUnits )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each **alive** UNIT, providing the UNIT and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive UNIT in the database. The function needs to accept a UNIT parameter.
|
||||
|
||||
@ -99,23 +99,31 @@
|
||||
-- * @{#ESCORT.MenuEvasion: Creates a menu structure to set the evasion techniques when the escort is under threat.
|
||||
-- * @{#ESCORT.MenuResumeMission}: Creates a menu structure so that the escort can resume from a waypoint.
|
||||
--
|
||||
--
|
||||
-- @usage
|
||||
-- -- Declare a new EscortPlanes object as follows:
|
||||
--
|
||||
-- -- First find the GROUP object and the CLIENT object.
|
||||
-- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
--
|
||||
-- -- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
-- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
|
||||
--
|
||||
--
|
||||
--
|
||||
-- @module Escort
|
||||
-- @author FlightControl
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
--- ESCORT class
|
||||
-- @type ESCORT
|
||||
-- @extends Base#BASE
|
||||
-- @field Client#CLIENT EscortClient
|
||||
-- @field Group#GROUP EscortGroup
|
||||
-- @field #string EscortName
|
||||
-- @field #ESCORT.MODE EscortMode The mode the escort is in.
|
||||
-- @field #number FollowScheduler The id of the _FollowScheduler function.
|
||||
-- @field Scheduler#SCHEDULER FollowScheduler The instance of the SCHEDULER class.
|
||||
-- @field #number FollowDistance The current follow distance.
|
||||
-- @field #boolean ReportTargets If true, nearby targets are reported.
|
||||
-- @Field DCSTypes#AI.Option.Air.val.ROE OptionROE Which ROE is set to the EscortGroup.
|
||||
-- @field DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the EscortGroup.
|
||||
@ -125,7 +133,7 @@ ESCORT = {
|
||||
EscortName = nil, -- The Escort Name
|
||||
EscortClient = nil,
|
||||
EscortGroup = nil,
|
||||
EscortMode = nil,
|
||||
EscortMode = 1,
|
||||
MODE = {
|
||||
FOLLOW = 1,
|
||||
MISSION = 2,
|
||||
@ -135,6 +143,7 @@ ESCORT = {
|
||||
ReportTargets = true,
|
||||
OptionROE = AI.Option.Air.val.ROE.OPEN_FIRE,
|
||||
OptionReactionOnThreat = AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION,
|
||||
SmokeDirectionVector = false,
|
||||
TaskPoints = {}
|
||||
}
|
||||
|
||||
@ -156,6 +165,15 @@ ESCORT = {
|
||||
-- @param Group#GROUP EscortGroup The group AI escorting the EscortClient.
|
||||
-- @param #string EscortName Name of the escort.
|
||||
-- @return #ESCORT self
|
||||
-- @usage
|
||||
-- -- Declare a new EscortPlanes object as follows:
|
||||
--
|
||||
-- -- First find the GROUP object and the CLIENT object.
|
||||
-- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
--
|
||||
-- -- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
-- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
|
||||
function ESCORT:New( EscortClient, EscortGroup, EscortName, EscortBriefing )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( { EscortClient, EscortGroup, EscortName } )
|
||||
@ -165,8 +183,6 @@ function ESCORT:New( EscortClient, EscortGroup, EscortName, EscortBriefing )
|
||||
self.EscortName = EscortName
|
||||
self.EscortBriefing = EscortBriefing
|
||||
|
||||
self:T( EscortGroup:GetClassNameAndID() )
|
||||
|
||||
-- Set EscortGroup known at EscortClient.
|
||||
if not self.EscortClient._EscortGroups then
|
||||
self.EscortClient._EscortGroups = {}
|
||||
@ -177,10 +193,8 @@ function ESCORT:New( EscortClient, EscortGroup, EscortName, EscortBriefing )
|
||||
self.EscortClient._EscortGroups[EscortGroup:GetName()].EscortGroup = self.EscortGroup
|
||||
self.EscortClient._EscortGroups[EscortGroup:GetName()].EscortName = self.EscortName
|
||||
self.EscortClient._EscortGroups[EscortGroup:GetName()].Targets = {}
|
||||
self.EscortMode = ESCORT.MODE.FOLLOW
|
||||
end
|
||||
|
||||
|
||||
self.EscortMenu = MENU_CLIENT:New( self.EscortClient, self.EscortName )
|
||||
|
||||
self.EscortGroup:WayPointInitialize(1)
|
||||
@ -194,9 +208,24 @@ function ESCORT:New( EscortClient, EscortGroup, EscortName, EscortBriefing )
|
||||
60, EscortClient
|
||||
)
|
||||
|
||||
self.FollowDistance = 100
|
||||
self.CT1 = 0
|
||||
self.GT1 = 0
|
||||
self.FollowScheduler = SCHEDULER:New( self, self._FollowScheduler, {}, 1, .5, .01 )
|
||||
self.EscortMode = ESCORT.MODE.MISSION
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.
|
||||
-- This allows to visualize where the escort is flying to.
|
||||
-- @param #ESCORT self
|
||||
-- @param #boolean SmokeDirection If true, then the direction vector will be smoked.
|
||||
function ESCORT:TestSmokeDirectionVector( SmokeDirection )
|
||||
self.SmokeDirectionVector = ( SmokeDirection == true ) and true or false
|
||||
end
|
||||
|
||||
|
||||
--- Defines the default menus
|
||||
-- @param #ESCORT self
|
||||
@ -223,6 +252,7 @@ function ESCORT:Menus()
|
||||
self:MenuEvasion()
|
||||
self:MenuResumeMission()
|
||||
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -633,7 +663,7 @@ function ESCORT._HoldPosition( MenuParam )
|
||||
local OrbitHeight = MenuParam.ParamHeight
|
||||
local OrbitSeconds = MenuParam.ParamSeconds -- Not implemented yet
|
||||
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
local PointFrom = {}
|
||||
local GroupPoint = EscortGroup:GetUnit(1):GetPointVec3()
|
||||
@ -662,6 +692,7 @@ function ESCORT._HoldPosition( MenuParam )
|
||||
|
||||
EscortGroup:SetTask( EscortGroup:TaskRoute( Points ) )
|
||||
EscortGroup:MessageToClient( "Orbiting at location.", 10, EscortClient )
|
||||
|
||||
end
|
||||
|
||||
--- @param #MENUPARAM MenuParam
|
||||
@ -684,9 +715,7 @@ end
|
||||
function ESCORT:JoinUpAndFollow( EscortGroup, EscortClient, Distance )
|
||||
self:F( { EscortGroup, EscortClient, Distance } )
|
||||
|
||||
if self.FollowScheduler then
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
end
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
EscortGroup:OptionROEHoldFire()
|
||||
EscortGroup:OptionROTPassiveDefense()
|
||||
@ -695,8 +724,8 @@ function ESCORT:JoinUpAndFollow( EscortGroup, EscortClient, Distance )
|
||||
|
||||
self.CT1 = 0
|
||||
self.GT1 = 0
|
||||
--self.FollowScheduler = routines.scheduleFunction( self._FollowScheduler, { self, Distance }, timer.getTime() + 1, .5 )
|
||||
self.FollowScheduler = SCHEDULER:New( self, self._FollowScheduler, { Distance }, 1, .5, .1 )
|
||||
self.FollowScheduler:Start()
|
||||
|
||||
EscortGroup:MessageToClient( "Rejoining and Following at " .. Distance .. "!", 30, EscortClient )
|
||||
end
|
||||
|
||||
@ -768,11 +797,7 @@ function ESCORT._ScanTargets( MenuParam )
|
||||
|
||||
local ScanDuration = MenuParam.ParamScanDuration
|
||||
|
||||
if self.FollowScheduler then
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
end
|
||||
|
||||
self:T( { "FollowScheduler after removefunction: ", self.FollowScheduler } )
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
if EscortGroup:IsHelicopter() then
|
||||
SCHEDULER:New( EscortGroup, EscortGroup.PushTask,
|
||||
@ -797,16 +822,16 @@ function ESCORT._ScanTargets( MenuParam )
|
||||
EscortGroup:MessageToClient( "Scanning targets for " .. ScanDuration .. " seconds.", ScanDuration, EscortClient )
|
||||
|
||||
if self.EscortMode == ESCORT.MODE.FOLLOW then
|
||||
--self.FollowScheduler = routines.scheduleFunction( self._FollowScheduler, { self, Distance }, timer.getTime() + ScanDuration, 1 )
|
||||
self.FollowScheduler:Start()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- @param Group#GROUP EscortGroup
|
||||
function _Resume( EscortGroup )
|
||||
env.info( '_Resume' )
|
||||
|
||||
local Escort = EscortGroup.Escort -- #ESCORT
|
||||
local Escort = EscortGroup:GetState( EscortGroup, "Escort" )
|
||||
env.info( "EscortMode = " .. Escort.EscortMode )
|
||||
if Escort.EscortMode == ESCORT.MODE.FOLLOW then
|
||||
Escort:JoinUpAndFollow( EscortGroup, Escort.EscortClient, Escort.Distance )
|
||||
@ -819,19 +844,18 @@ function ESCORT._AttackTarget( MenuParam )
|
||||
|
||||
local self = MenuParam.ParamSelf
|
||||
local EscortGroup = self.EscortGroup
|
||||
|
||||
local EscortClient = self.EscortClient
|
||||
local AttackUnit = MenuParam.ParamUnit -- Unit#UNIT
|
||||
|
||||
if self.FollowScheduler then
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
end
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
self:T( AttackUnit )
|
||||
|
||||
if EscortGroup:IsAir() then
|
||||
EscortGroup:OptionROEOpenFire()
|
||||
EscortGroup:OptionROTPassiveDefense()
|
||||
EscortGroup.Escort = self -- Need to do this trick to get the reference for the escort in the _Resume function.
|
||||
EscortGroup:SetState( EscortGroup, "Escort", self )
|
||||
-- routines.scheduleFunction(
|
||||
-- EscortGroup.PushTask,
|
||||
-- { EscortGroup,
|
||||
@ -846,7 +870,7 @@ function ESCORT._AttackTarget( MenuParam )
|
||||
EscortGroup.PushTask,
|
||||
{ EscortGroup:TaskCombo(
|
||||
{ EscortGroup:TaskAttackUnit( AttackUnit ),
|
||||
EscortGroup:TaskFunction( 1, 2, "_Resume", {"''"} )
|
||||
EscortGroup:TaskFunction( 1, 2, "_Resume", { "''" } )
|
||||
}
|
||||
)
|
||||
}, 10
|
||||
@ -870,9 +894,9 @@ function ESCORT._AttackTarget( MenuParam )
|
||||
}, 10
|
||||
)
|
||||
end
|
||||
|
||||
EscortGroup:MessageToClient( "Engaging Designated Unit!", 10, EscortClient )
|
||||
|
||||
|
||||
end
|
||||
|
||||
--- @param #MENUPARAM MenuParam
|
||||
@ -884,10 +908,7 @@ function ESCORT._AssistTarget( MenuParam )
|
||||
local EscortGroupAttack = MenuParam.ParamEscortGroup
|
||||
local AttackUnit = MenuParam.ParamUnit -- Unit#UNIT
|
||||
|
||||
if self.FollowScheduler then
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
end
|
||||
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
self:T( AttackUnit )
|
||||
|
||||
@ -973,8 +994,7 @@ function ESCORT._ResumeMission( MenuParam )
|
||||
|
||||
local WayPoint = MenuParam.ParamWayPoint
|
||||
|
||||
routines.removeFunction( self.FollowScheduler )
|
||||
self.FollowScheduler = nil
|
||||
self.FollowScheduler:Stop()
|
||||
|
||||
local WayPoints = EscortGroup:GetTaskRoute()
|
||||
self:T( WayPoint, WayPoints )
|
||||
@ -1005,16 +1025,21 @@ function ESCORT:RegisterRoute()
|
||||
end
|
||||
|
||||
--- @param Escort#ESCORT self
|
||||
function ESCORT:_FollowScheduler( FollowDistance )
|
||||
self:F( { FollowDistance })
|
||||
function ESCORT:_FollowScheduler()
|
||||
self:F( { self.FollowDistance } )
|
||||
|
||||
self:T( {self.EscortClient.UnitName, self.EscortGroup.GroupName } )
|
||||
if self.EscortGroup:IsAlive() and self.EscortClient:IsAlive() then
|
||||
|
||||
local ClientUnit = self.EscortClient:GetClientGroupUnit()
|
||||
local GroupUnit = self.EscortGroup:GetUnit( 1 )
|
||||
local FollowDistance = self.FollowDistance
|
||||
|
||||
self:T( {ClientUnit.UnitName, GroupUnit.UnitName } )
|
||||
|
||||
if self.CT1 == 0 and self.GT1 == 0 then
|
||||
self.CV1 = ClientUnit:GetPointVec3()
|
||||
self:T( { "self.CV1", self.CV1 } )
|
||||
self.CT1 = timer.getTime()
|
||||
self.GV1 = GroupUnit:GetPointVec3()
|
||||
self.GT1 = timer.getTime()
|
||||
@ -1074,7 +1099,10 @@ function ESCORT:_FollowScheduler( FollowDistance )
|
||||
-- Now we can calculate the group destination vector GDV.
|
||||
local GDV = { x = DVu.x * CS * 8 + CVI.x, y = CVI.y, z = DVu.z * CS * 8 + CVI.z }
|
||||
|
||||
--trigger.action.smoke( GDV, trigger.smokeColor.Red )
|
||||
if self.SmokeDirectionVector == true then
|
||||
trigger.action.smoke( GDV, trigger.smokeColor.Red )
|
||||
end
|
||||
|
||||
self:T2( { "CV2:", CV2 } )
|
||||
self:T2( { "CVI:", CVI } )
|
||||
self:T2( { "GDV:", GDV } )
|
||||
@ -1092,11 +1120,12 @@ function ESCORT:_FollowScheduler( FollowDistance )
|
||||
Speed = 0
|
||||
end
|
||||
|
||||
self:T( { "Client Speed, Escort Speed, Speed, FlyDistance, Time:", CS, GS, Speed, Distance, Time } )
|
||||
self:T( { "Client Speed, Escort Speed, Speed, FollowDistance, Time:", CS, GS, Speed, FollowDistance, Time } )
|
||||
|
||||
-- Now route the escort to the desired point with the desired speed.
|
||||
self.EscortGroup:TaskRouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@ -1278,6 +1307,7 @@ function ESCORT:_ReportTargetsScheduler()
|
||||
MENU_CLIENT_COMMAND:New( self.EscortClient, "Waypoint " .. WayPointID .. " at " .. string.format( "%.2f", Distance ).. "km", self.EscortMenuResumeMission, ESCORT._ResumeMission, { ParamSelf = self, ParamWayPoint = WayPointID } )
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@ -494,11 +494,11 @@ function EVENT:onEvent( Event )
|
||||
self:E( { _EVENTCODES[Event.id], Event } )
|
||||
for ClassName, EventData in pairs( self.Events[Event.id] ) do
|
||||
if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then
|
||||
self:T2( { "Calling event function for class ", ClassName, " unit ", Event.IniDCSUnitName } )
|
||||
self:E( { "Calling event function for class ", ClassName, " unit ", Event.IniDCSUnitName } )
|
||||
EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventSelf, Event )
|
||||
else
|
||||
if Event.IniDCSUnit and not EventData.IniUnit then
|
||||
self:T2( { "Calling event function for class ", ClassName } )
|
||||
self:E( { "Calling event function for class ", ClassName } )
|
||||
EventData.EventFunction( EventData.EventSelf, Event )
|
||||
end
|
||||
end
|
||||
|
||||
@ -185,6 +185,7 @@ function GROUP:Find( DCSGroup )
|
||||
|
||||
local GroupName = DCSGroup:getName() -- Group#GROUP
|
||||
local GroupFound = _DATABASE:FindGroup( GroupName )
|
||||
GroupFound:E( { GroupName, GroupFound:GetClassNameAndID() } )
|
||||
return GroupFound
|
||||
end
|
||||
|
||||
@ -517,13 +518,14 @@ end
|
||||
|
||||
|
||||
function GROUP:TaskFunction( WayPoint, WayPointIndex, FunctionString, FunctionArguments )
|
||||
self:F2( { WayPoint, WayPointIndex, FunctionString, FunctionArguments } )
|
||||
|
||||
local DCSTask
|
||||
|
||||
local DCSScript = {}
|
||||
DCSScript[#DCSScript+1] = "local MissionGroup = GROUP:Find( ... ) "
|
||||
|
||||
if FunctionArguments.n > 0 then
|
||||
if FunctionArguments and #FunctionArguments > 0 then
|
||||
DCSScript[#DCSScript+1] = FunctionString .. "( MissionGroup, " .. table.concat( FunctionArguments, "," ) .. ")"
|
||||
else
|
||||
DCSScript[#DCSScript+1] = FunctionString .. "( MissionGroup )"
|
||||
|
||||
@ -46,13 +46,12 @@ function SCHEDULER:New( TimeEventObject, TimeEventFunction, TimeEventFunctionArg
|
||||
self.TimeEventFunction = TimeEventFunction
|
||||
self.TimeEventFunctionArguments = TimeEventFunctionArguments
|
||||
self.StartSeconds = StartSeconds
|
||||
self.Repeat = false
|
||||
|
||||
if RepeatSecondsInterval then
|
||||
self.RepeatSecondsInterval = RepeatSecondsInterval
|
||||
self.Repeat = true
|
||||
else
|
||||
self.RepeatSecondsInterval = 0
|
||||
self.Repeat = false
|
||||
end
|
||||
|
||||
if RandomizationFactor then
|
||||
@ -79,7 +78,10 @@ end
|
||||
function SCHEDULER:Start()
|
||||
self:F2( self.TimeEventObject )
|
||||
|
||||
timer.scheduleFunction( self._Scheduler, self, timer.getTime() + self.StartSeconds + .01 )
|
||||
if self.RepeatSecondsInterval ~= 0 then
|
||||
self.Repeat = true
|
||||
end
|
||||
timer.scheduleFunction( self._Scheduler, self, timer.getTime() + self.StartSeconds + .01 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -19,6 +19,11 @@ do
|
||||
:MenuReportTargets( 60, 20 )
|
||||
:MenuResumeMission()
|
||||
:MenuAssistedAttack()
|
||||
|
||||
local EscortGroupArtillery = SpawnEscortArtillery:ReSpawn(1)
|
||||
local EscortArtillery = ESCORT
|
||||
:New( Client, EscortGroupArtillery, "Escort Artillery" )
|
||||
:Menus()
|
||||
end
|
||||
|
||||
local function EventAlivePlane( Client )
|
||||
@ -52,6 +57,7 @@ do
|
||||
SpawnEscortPlane = SPAWN:New( "Escort Plane" )
|
||||
SpawnEscortGround = SPAWN:New( "Escort Ground" )
|
||||
SpawnEscortShip = SPAWN:New( "Escort Ship" )
|
||||
SpawnEscortArtillery = SPAWN:New( "Ground Attack Assistance" )
|
||||
|
||||
EscortClientHeli = CLIENT:FindByName( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter )
|
||||
EscortClientPlane = CLIENT:FindByName( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." )
|
||||
|
||||
253
Moose Training/Documentation/AIBalancer.html
Normal file
253
Moose Training/Documentation/AIBalancer.html
Normal file
@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li>AIBalancer</li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="Mission.html">Mission</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="Point.html">Point</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>AIBalancer</code></h1>
|
||||
|
||||
<p>This module contains the AIBALANCER class.</p>
|
||||
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="AIBalancer.html##(AIBALANCER)">AIBalancer#AIBALANCER</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
<p>The <a href="AIBalancer.html##(AIBALANCER)">AIBalancer#AIBALANCER</a> class controls the dynamic spawning of AI GROUPS depending on a SET<em>CLIENT.
|
||||
There will be as many AI GROUPS spawned as there at CLIENTS in SET</em>CLIENT not spawned.</p>
|
||||
|
||||
<h2>1.1) AIBALANCER construction method:</h2>
|
||||
<p>Create a new AIBALANCER object with the <a href="##(AIBALANCER).New">AIBALANCER.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AIBALANCER).New">AIBALANCER.New</a>: Creates a new AIBALANCER object.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AIBALANCER">AIBALANCER</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(AIBALANCER)">Type <code>AIBALANCER</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).ClassName">AIBALANCER.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).New">AIBALANCER:New(SetClient, SpawnAI)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).SetClient">AIBALANCER.SetClient</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER).SpawnAI">AIBALANCER.SpawnAI</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIBALANCER)._ClientAliveMonitorScheduler">AIBALANCER:_ClientAliveMonitorScheduler()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(AIBALANCER)">#AIBALANCER</a></em>
|
||||
<a id="AIBALANCER" >
|
||||
<strong>AIBALANCER</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(AIBalancer)" >Type <code>AIBalancer</code></a></h2>
|
||||
|
||||
<h2><a id="#(AIBALANCER)" >Type <code>AIBALANCER</code></a></h2>
|
||||
|
||||
<p>AIBALANCER class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AIBALANCER).ClassName" >
|
||||
<strong>AIBALANCER.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIBALANCER).New" >
|
||||
<strong>AIBALANCER:New(SetClient, SpawnAI)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SetClient </em></code>:
|
||||
A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnAI </em></code>:
|
||||
A SPAWN object that will spawn the AI units required, balancing the SetClient.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AIBALANCER)">#AIBALANCER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Set.html##(SET_CLIENT)">Set#SET_CLIENT</a></em>
|
||||
<a id="#(AIBALANCER).SetClient" >
|
||||
<strong>AIBALANCER.SetClient</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Spawn.html##(SPAWN)">Spawn#SPAWN</a></em>
|
||||
<a id="#(AIBALANCER).SpawnAI" >
|
||||
<strong>AIBALANCER.SpawnAI</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIBALANCER)._ClientAliveMonitorScheduler" >
|
||||
<strong>AIBALANCER:_ClientAliveMonitorScheduler()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li>Airbase</li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li>Base</li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -161,6 +162,12 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).ClassName">BASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
<p>The name of the class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).ClearState">BASE:ClearState(Object, StateName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -239,6 +246,12 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).GetClassNameAndID">BASE:GetClassNameAndID()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the ClassName + ClassID of the class instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).GetState">BASE:GetState(Object, StateName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -260,9 +273,21 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).T">BASE:T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).SetState">BASE:SetState(Object, StateName, State)</a></td>
|
||||
<td class="summary">
|
||||
<p>Trace a function logic.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).States">BASE.States</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).T">BASE:T(Arguments)</a></td>
|
||||
<td class="summary">
|
||||
<p>Trace a function logic level 1.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -299,6 +324,12 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceLevel">BASE:TraceLevel(Level)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set trace level</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE)._T">BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</a></td>
|
||||
<td class="summary">
|
||||
<p>Trace a function logic.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -415,6 +446,32 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).ClearState" >
|
||||
<strong>BASE:ClearState(Object, StateName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Object </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> StateName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).CreateEventBirth" >
|
||||
<strong>BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)</strong>
|
||||
</a>
|
||||
@ -722,6 +779,32 @@ The ClassName + ClassID of the class instance.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).GetState" >
|
||||
<strong>BASE:GetState(Object, StateName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Object </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> StateName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).Inherit" >
|
||||
<strong>BASE:Inherit(Child, Parent)</strong>
|
||||
</a>
|
||||
@ -817,34 +900,69 @@ end</code></pre>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).T" >
|
||||
<strong>BASE:T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</strong>
|
||||
<a id="#(BASE).SetState" >
|
||||
<strong>BASE:SetState(Object, StateName, State)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Trace a function logic.</p>
|
||||
|
||||
|
||||
<p>Can be anywhere within the function logic.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Object </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> StateName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> State </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(BASE).States" >
|
||||
<strong>BASE.States</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).T" >
|
||||
<strong>BASE:T(Arguments)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Trace a function logic level 1.</p>
|
||||
|
||||
|
||||
<p>Can be anywhere within the function logic.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Arguments </em></code>:
|
||||
A #table or any field.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DebugInfoCurrentParam </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DebugInfoFromParam </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -992,6 +1110,38 @@ true = trace all methods in MOOSE.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE)._T" >
|
||||
<strong>BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Trace a function logic.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Arguments </em></code>:
|
||||
A #table or any field.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DebugInfoCurrentParam </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DebugInfoFromParam </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).onEvent" >
|
||||
<strong>BASE:onEvent(event)</strong>
|
||||
</a>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li>CARGO</li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -130,7 +131,7 @@ If the DCS Unit object does not exist or is nil, the CLIENT methods will return
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack, ...)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack, CallBackFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
</td>
|
||||
@ -412,7 +413,7 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).Alive" >
|
||||
<strong>CLIENT:Alive(CallBack, ...)</strong>
|
||||
<strong>CLIENT:Alive(CallBack, CallBackFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -429,6 +430,11 @@ Function.</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CallBackFunction </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -278,6 +279,24 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GROUPS">DATABASE.GROUPS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCategoryFromClientTemplate">DATABASE:GetCategoryFromClientTemplate(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCoalitionFromClientTemplate">DATABASE:GetCoalitionFromClientTemplate(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetCountryFromClientTemplate">DATABASE:GetCountryFromClientTemplate(ClientName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -362,6 +381,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._EventOnPlayerLeaveUnit">DATABASE:_EventOnPlayerLeaveUnit(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnPlayerLeaveUnit event to clean the active players table.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterClients">DATABASE:_RegisterClients()</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers all Units of skill Client or Player within in the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -383,7 +408,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterTemplate">DATABASE:_RegisterTemplate(GroupTemplate)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterTemplate">DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
|
||||
</td>
|
||||
@ -1067,6 +1092,69 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).GetCategoryFromClientTemplate" >
|
||||
<strong>DATABASE:GetCategoryFromClientTemplate(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).GetCoalitionFromClientTemplate" >
|
||||
<strong>DATABASE:GetCoalitionFromClientTemplate(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).GetCountryFromClientTemplate" >
|
||||
<strong>DATABASE:GetCountryFromClientTemplate(ClientName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ClientName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1340,6 +1428,24 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterClients" >
|
||||
<strong>DATABASE:_RegisterClients()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers all Units of skill Client or Player within in the mission.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterGroupsAndUnits" >
|
||||
<strong>DATABASE:_RegisterGroupsAndUnits()</strong>
|
||||
</a>
|
||||
@ -1390,19 +1496,34 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterTemplate" >
|
||||
<strong>DATABASE:_RegisterTemplate(GroupTemplate)</strong>
|
||||
<strong>DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table GroupTemplate </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CoalitionID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CategoryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CountryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -175,6 +176,20 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Usage:</h2>
|
||||
<pre class="example"><code>-- Declare a new EscortPlanes object as follows:
|
||||
|
||||
-- First find the GROUP object and the CLIENT object.
|
||||
local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
|
||||
-- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
|
||||
|
||||
|
||||
</code></pre>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
@ -430,12 +445,18 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
<td class="name" nowrap="nowrap"><a href="##(ESCORT).EscortName">ESCORT.EscortName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ESCORT).FollowDistance">ESCORT.FollowDistance</a></td>
|
||||
<td class="summary">
|
||||
<p>The current follow distance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ESCORT).FollowScheduler">ESCORT.FollowScheduler</a></td>
|
||||
<td class="summary">
|
||||
<p>The id of the _FollowScheduler function.</p>
|
||||
<p>The instance of the SCHEDULER class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -589,7 +610,7 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ESCORT)._FollowScheduler">ESCORT:_FollowScheduler(FollowDistance)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ESCORT)._FollowScheduler">ESCORT:_FollowScheduler()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@ -1322,13 +1343,27 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(ESCORT).FollowDistance" >
|
||||
<strong>ESCORT.FollowDistance</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>The current follow distance.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Scheduler.html##(SCHEDULER)">Scheduler#SCHEDULER</a></em>
|
||||
<a id="#(ESCORT).FollowScheduler" >
|
||||
<strong>ESCORT.FollowScheduler</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>The id of the _FollowScheduler function.</p>
|
||||
<p>The instance of the SCHEDULER class.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1788,6 +1823,16 @@ Name of the escort.</p>
|
||||
<p><em><a href="##(ESCORT)">#ESCORT</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Declare a new EscortPlanes object as follows:
|
||||
|
||||
-- First find the GROUP object and the CLIENT object.
|
||||
local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
|
||||
-- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1962,21 +2007,13 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(ESCORT)._FollowScheduler" >
|
||||
<strong>ESCORT:_FollowScheduler(FollowDistance)</strong>
|
||||
<strong>ESCORT:_FollowScheduler()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> FollowDistance </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -190,6 +191,12 @@ It suports the following functionality:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).ClassName">MISSILETRAINER.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).DBClients">MISSILETRAINER.DBClients</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -286,6 +293,12 @@ It suports the following functionality:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).TrackingFrequency">MISSILETRAINER.TrackingFrequency</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).TrackingMissiles">MISSILETRAINER.TrackingMissiles</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -310,6 +323,12 @@ It suports the following functionality:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._AddRange">MISSILETRAINER:_AddRange(Client, TrainerWeapon)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._Alive">MISSILETRAINER._Alive(Client, self)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -408,6 +427,20 @@ It suports the following functionality:</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Set.html##(SET_CLIENT)">Set#SET_CLIENT</a></em>
|
||||
<a id="#(MISSILETRAINER).DBClients" >
|
||||
<strong>MISSILETRAINER.DBClients</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -786,6 +819,20 @@ The distance in meters when a tracked missile needs to be destroyed when close t
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).TrackingMissiles" >
|
||||
<strong>MISSILETRAINER.TrackingMissiles</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -871,6 +918,32 @@ The distance in meters when a tracked missile needs to be destroyed when close t
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._Alive" >
|
||||
<strong>MISSILETRAINER._Alive(Client, self)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Client </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._EventShot" >
|
||||
<strong>MISSILETRAINER:_EventShot(Event)</strong>
|
||||
</a>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
index
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
@ -71,6 +72,12 @@
|
||||
<div id="content">
|
||||
<h2>Module</h2>
|
||||
<table class="module_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="AIBalancer.html">AIBalancer</a></td>
|
||||
<td class="summary">
|
||||
<p>This module contains the AIBALANCER class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Airbase.html">Airbase</a></td>
|
||||
<td class="summary">
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AIBalancer.html">AIBalancer</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user