mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into FC-Zone-Transport-Cargo
This commit is contained in:
commit
d5c7d0028b
565
Moose Development/Documentation/DCS_ControlAPI.txt
Normal file
565
Moose Development/Documentation/DCS_ControlAPI.txt
Normal file
@ -0,0 +1,565 @@
|
||||
DCS Simulation Control User Scripts
|
||||
====================================
|
||||
|
||||
The behaviour of the DCS can be altered using the *GameGUI.lua scripts.
|
||||
You define the hooks to the DCS events, and then do what you want using the provided API.
|
||||
===================================================================================================
|
||||
|
||||
When loading, DCS searches for Saved Games\DCS\Scripts\*GameGUI.lua files,
|
||||
sorts them by name and then loads into the GUI Lua-state.
|
||||
Each user script is loaded into an isolated environment, so the only
|
||||
thing they share is the state of the simulator.
|
||||
|
||||
Each script defines a set of callbacks to the DCS events and sets them with the call
|
||||
DCS.setUserCallbacks(cb_table)
|
||||
For each callback type the hooks of all user scripts will be called in order of loading.
|
||||
|
||||
For callbacks which are supposed to returning a value, currently there are 3 of them:
|
||||
onPlayerTryConnect
|
||||
onPlayerTrySendChat
|
||||
onPlayerTryChangeSlot
|
||||
returning a value means breaking the hook call chain.
|
||||
Returning nothing (or nil) means continuing the hook chain, which ends with the default allow-all handlers.
|
||||
|
||||
The example user script 'testGameGUI.lua':
|
||||
----------------------------------------------------------------------------------------------
|
||||
local test = {}
|
||||
|
||||
function test.onPlayerTryConnect(ipaddr, name, ucid, playerID)
|
||||
print('onPlayerTryConnect(%s, %s, %s, %d)', ipaddr, name, ucid, playerID)
|
||||
-- if you want to gently intercept the call, allowing other user scripts to get it,
|
||||
-- you better return nothing here
|
||||
return true -- allow the player to connect
|
||||
end
|
||||
|
||||
function test.onSimulationStart()
|
||||
print('Current mission is '..DCS.getMissionName())
|
||||
end
|
||||
|
||||
DCS.setUserCallbacks(test) -- here we set our callbacks
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
The available API are documented below.
|
||||
The full list of the callbacks is at the end of this document.
|
||||
|
||||
In addition, all standard lua 5.1 libraries are available as well, namely:
|
||||
base api, like print, etc,
|
||||
math.*
|
||||
table.*
|
||||
string.*
|
||||
io.*
|
||||
os.*
|
||||
debug.*
|
||||
|
||||
===================================================================================================
|
||||
|
||||
|
||||
|
||||
Lua File System (lfs) API
|
||||
-------------------------------
|
||||
lfs.currentdir() -> string
|
||||
Returns the path of the DCS install folder
|
||||
|
||||
lfs.writedir() -> string
|
||||
Returns the path of the current 'Saved Games\DCS' folder.
|
||||
|
||||
lfs.tempdir() -> string
|
||||
Returns the pat of the DCS Temp folder (AppData\Local\Temp\DCS).
|
||||
|
||||
lfs.mkdir()
|
||||
lfs.rmdir()
|
||||
lfs.attributes()
|
||||
lfs.dir()
|
||||
lfs.normpath()
|
||||
lfs.realpath()
|
||||
|
||||
|
||||
|
||||
DCS Control API, table 'DCS.*'
|
||||
-------------------------------
|
||||
|
||||
DCS.setPause(bool)
|
||||
Pauses/resumes the simulation. Server-side only.
|
||||
|
||||
DCS.getPause() -> bool
|
||||
true if simulation is paused
|
||||
|
||||
DCS.stopMission()
|
||||
stops current mission
|
||||
|
||||
DCS.exitProcess()
|
||||
Exits the DCS process.
|
||||
|
||||
DCS.isMultiplayer() -> bool
|
||||
True when running in the multiplayer mode.
|
||||
|
||||
DCS.isServer() -> bool
|
||||
True when running as a server or in the single-player mode.
|
||||
|
||||
DCS.getModelTime() -> number
|
||||
returns current DCS simulation time in seconds.
|
||||
|
||||
DCS.getRealTime() -> number
|
||||
returns current DCS real time in seconds relative to the DCS start time.
|
||||
|
||||
DCS.getMissionOptions() -> table
|
||||
Returns the value of 'mission.options'
|
||||
|
||||
DCS.getMissionDescription() -> string
|
||||
translated mission.descriptionText string
|
||||
|
||||
DCS.getAvailableCoalitions() -> table {
|
||||
[coalition_id] = { name = "coalition name", }
|
||||
...
|
||||
}
|
||||
Returns a list of coalitions which have available slots.
|
||||
|
||||
DCS.getAvailableSlots(coalitionID) -> array of {unitId, type, role, callsign, groupName, country}
|
||||
Returns the list of available slots.
|
||||
NOTE: the returned unitID is actually a slotID, which for multi-seat units is 'unitID_seatID'
|
||||
|
||||
DCS.getCurrentMission() -> table with the currently loaded mission
|
||||
NOTE: to get valid mission.options use DCS.getMissionOptions()
|
||||
|
||||
DCS.getMissionName() -> string
|
||||
Returns the name of the current mission
|
||||
|
||||
DCS.getMissionFilename() -> string
|
||||
Returns the file name of the current mission (returns nil when acting as a multiplayer client).
|
||||
|
||||
DCS.getMissionResult(string side) -> integer [0, 100]
|
||||
Gets missin result for either 'red' or 'blue'
|
||||
|
||||
DCS.getUnitProperty(missionId, propertyId) -> string
|
||||
propertyId:
|
||||
DCS.UNIT_RUNTIME_ID, // unique within runtime mission. int
|
||||
DCS.UNIT_MISSION_ID, // unique within mission file. int>0
|
||||
DCS.UNIT_NAME, // unit name, as assigned by mission designer.
|
||||
DCS.UNIT_TYPE, // unit type (Ural, ZU-23, etc)
|
||||
DCS.UNIT_CATEGORY,
|
||||
DCS.UNIT_GROUP_MISSION_ID, // group ID, unique within mission file. int>0
|
||||
DCS.UNIT_GROUPNAME, // group name, as assigned by mission designer.
|
||||
DCS.UNIT_GROUPCATEGORY,
|
||||
DCS.UNIT_CALLSIGN,
|
||||
DCS.UNIT_HIDDEN,// ME hiding
|
||||
DCS.UNIT_COALITION,// "blue", "red" or "unknown"
|
||||
DCS.UNIT_COUNTRY_ID,
|
||||
DCS.UNIT_TASK, //"unit.group.task"
|
||||
DCS.UNIT_PLAYER_NAME, // valid for network "humanable" units
|
||||
DCS.UNIT_ROLE,//"artillery_commander", "instructor", etc
|
||||
DCS.UNIT_INVISIBLE_MAP_ICON,//ME invisible map icon
|
||||
|
||||
DCS.getUnitType(missionId) -> typeId
|
||||
a shortcut for DCS.getUnitProperty(missionId, DCS.UNIT_TYPE)
|
||||
|
||||
DCS.getUnitTypeAttribute(typeId, attr) -> string
|
||||
Returns a value from Database: Objects[typeId][attr],
|
||||
for example DCS.getUnitTypeAttribute("Ural", "DisplayName")
|
||||
|
||||
DCS.writeDebriefing(str)
|
||||
Writes a custom string to the debriefing file
|
||||
|
||||
DCS.setUserCallbacks(cb_table)
|
||||
Hooks the callbacks using the handlers from the provided table.
|
||||
See: "GameGUI scripts" section.
|
||||
|
||||
|
||||
|
||||
Logging API 'log.*'
|
||||
------------------------
|
||||
Logging works as follows:
|
||||
a) each log message is accompanied with 2 attributes: a subsystem, and level.
|
||||
b) after each messages gets into a logger it passes (asynchronously) through
|
||||
a series of output filters which decide where the message will be written to.
|
||||
|
||||
Writing to log is done by:
|
||||
|
||||
log.write(SUBSYSTEM_NAME, LOG_LEVEL, message, ...)
|
||||
if there are any arguments after 'message',
|
||||
the actual string is formed as string.format(message, ...)
|
||||
|
||||
SUBSYSTEM_NAME is a string
|
||||
LOG_LEVEL is one of the values, listed below
|
||||
see log.set_output()
|
||||
|
||||
log.set_output(log_file_name_wo_ext, rule_subsystem_name, rule_level_mask, rule_output_mode)
|
||||
|
||||
the args:
|
||||
log_file_name_wo_ext: resulting log will be written to $WRITE_DIR/Logs/<log_file_name_wo_ext>.log
|
||||
|
||||
rule_subsytem_name: the name of the subsystem whose messages to write or empty string to match all subsystems
|
||||
|
||||
rule_level_mask: a sum of log-level bit flags to match messages
|
||||
valid flags are:
|
||||
log.ALERT
|
||||
log.ERROR
|
||||
log.WARNING
|
||||
log.INFO
|
||||
log.DEBUG
|
||||
log.ALL - includes all of the above
|
||||
log.TRACE - a special level which is excluded from dcs.log file
|
||||
|
||||
rule_output_mode: a sum of output flags:
|
||||
log.MESSAGE
|
||||
log.TIME
|
||||
log.MODULE - this is a 'subsystem', not a dlc
|
||||
log.LEVEL
|
||||
log.FULL - all of the above
|
||||
|
||||
So, in order to save net.trace(msg) messages to a file, you should issue a call:
|
||||
log.set_output('lua-net', 'LuaNET', log.TRACE, log.MESSAGE + log.TIME)
|
||||
|
||||
This will write to a Logs/lua-net.log file
|
||||
|
||||
Or, to save everything lua-network-related:
|
||||
log.set_output('lua-net', 'LuaNET', log.TRACE + log.ALL, log.MESSAGE + log.TIME + log.LEVEL)
|
||||
|
||||
To close the log file, you must use
|
||||
log.set_output('lua-net', '', 0, 0)
|
||||
|
||||
log.* API is available in the 'Saved Games\DCS\Config\autoexec.cfg' file as well so you can control log output in you local machine.
|
||||
|
||||
|
||||
|
||||
Network specific API, available through the table 'net.'
|
||||
----------------------------------------------------------------
|
||||
|
||||
net.log(msg) -- equivalent to log.write('LuaNET', log.INFO, msg)
|
||||
net.trace(msg) -- equivalent to log.write('LuaNET', log.TRACE, msg)
|
||||
|
||||
What is the difference: log() always writes to dcs.log, but may lose messages if the output rate is too high.
|
||||
trace() output never appears in the dcs.log file, it must be explicitly directed to a log file.
|
||||
It never loses messages when there's an active output, but it may block if output rate is higher than writing to the log file.
|
||||
To control logger output you can use $WRITE_DIR/Config/autoexec.cfg file, or call this from your network script
|
||||
(log.* API, see above)
|
||||
|
||||
|
||||
net.dostring_in(state, string) -> string
|
||||
Executes a lua-string in a given internal lua-state and returns a string result
|
||||
Valid state names are:
|
||||
'config': the state in which $INSTALL_DIR/Config/main.cfg is executed, as well as $WRITE_DIR/Config/autoexec.cfg
|
||||
used for configuration settings
|
||||
'mission': holds current mission
|
||||
'export': runs $WRITE_DIR/Scripts/Export.lua and the relevant export API
|
||||
|
||||
net.send_chat(string message, bool all)
|
||||
Send chat message. If not all, then send to my coalition (side) only.
|
||||
|
||||
net.send_chat_to(string message, playerID to)
|
||||
Send direct chat message to a player
|
||||
Server-side only:
|
||||
net.send_chat_to(string message, playerID to[, playerID from])
|
||||
|
||||
net.recv_chat(message[, int from=0])
|
||||
Receive chat message locally[, pretending it was sent by another player].
|
||||
from = 0 means from the system
|
||||
|
||||
net.load_mission(miz_filename)
|
||||
Loads a specified mission, temporarily overriding the server mission list.
|
||||
SERVER ONLY
|
||||
|
||||
net.load_next_mission() -> bool
|
||||
Load the next mission from the server mission list. Returns false if list end is reached
|
||||
SERVER ONLY
|
||||
|
||||
net.get_player_list() -> array of playerID
|
||||
Returns the list of currently connected players
|
||||
|
||||
net.get_my_player_id() -> playerID
|
||||
Returns the playerID of the local player. Currently always 1 for the server.
|
||||
|
||||
net.get_server_id() -> playerID
|
||||
Returns playerID of the server. Currently, always 1.
|
||||
|
||||
net.get_player_info(playerID) -> table
|
||||
Returns a table of all player attributes or nil if playerID is invalid
|
||||
|
||||
net.get_player_info(playerID, attrName) -> value
|
||||
Returns a value of a given attribute for the playerID.
|
||||
|
||||
Currently defined attributes are:
|
||||
'id': playerID
|
||||
'name': player name
|
||||
'side': 0 - spectators, 1 - red, 2 - blue
|
||||
'slot': slotID of the player or ''
|
||||
'ping': ping of the player in ms
|
||||
'ipaddr': IP address of the player, SERVER ONLY
|
||||
'ucid': Unique Client Identifier, SERVER ONLY
|
||||
|
||||
net.kick(id, message)
|
||||
Kick a player.
|
||||
|
||||
net.get_stat(playerID, statID) -> integer
|
||||
Get statistics for player. statIDs are:
|
||||
net.PS_PING (0) - ping (in ms)
|
||||
net.PS_CRASH (1) - number of crashes
|
||||
net.PS_CAR (2) - number of destroyed vehicles
|
||||
net.PS_PLANE (3) - ... planes/helicopters
|
||||
net.PS_SHIP (4) - ... ships
|
||||
net.PS_SCORE (5) - total score
|
||||
net.PS_LAND (6) - number of landings
|
||||
net.PS_EJECT (7) - of ejects
|
||||
|
||||
|
||||
net.get_name(playerID) -> string
|
||||
The same as net.get_player_info(playerID, 'name')
|
||||
FIXME: implement in ServMan_compat.lua ?
|
||||
|
||||
net.get_slot(playerID) -> sideID, slotID
|
||||
The same as:
|
||||
net.get_player_info(playerID, 'side'), net.get_player_info(playerID, 'slot')
|
||||
FIXME: implement in ServMan_compat.lua ?
|
||||
|
||||
|
||||
|
||||
net.set_slot(sideID, slotID)
|
||||
Try to set the local player's slot. Empty slotID ('') puts the player into spectators.
|
||||
|
||||
net.force_player_slot(playerID, sideID, slotID) -> boolean
|
||||
Forces a player to occupy a set slot. Slot '' means no slot (moves player to spectators)
|
||||
SideID: 0 - spectators, 1 - red, 2 - blue
|
||||
|
||||
net.set_name(playerID, name) -- OBSOLETE, works only locally
|
||||
|
||||
|
||||
net.lua2json(value) -> string
|
||||
Convert a Lua value to JSON string
|
||||
|
||||
net.json2lua(json_string) -> value
|
||||
Convert JSON string to a Lua value
|
||||
|
||||
|
||||
LuaExport API 'Export.Lo*'
|
||||
----------------------------------------------------------------
|
||||
See Scripts/Export.lua for the documentation. Note that all export
|
||||
API functions are available here in the Export. namespace, not the global one.
|
||||
In multiplayer the availability of the API on clients depends on the server setting.
|
||||
|
||||
The calls to check export capabilities:
|
||||
Export.LoIsObjectExportAllowed() -- returns the value of server.advanced.allow_object_export
|
||||
Export.LoIsSensorExportAllowed() -- returns the value of server.advanced.allow_sensor_export
|
||||
Export.LoIsOwnshipExportAllowed() -- returns the value of server.advanced.allow_ownship_export
|
||||
|
||||
These calls are only available on clients when LoIsObjectExportAllowed() is true:
|
||||
Export.LoGetObjectById
|
||||
Export.LoGetWorldObjects
|
||||
|
||||
These calls are only available on clients when LoIsSensorExportAllowed() is true:
|
||||
Export.LoGetTWSInfo
|
||||
Export.LoGetTargetInformation
|
||||
Export.LoGetLockedTargetInformation
|
||||
Export.LoGetF15_TWS_Contacts
|
||||
Export.LoGetSightingSystemInfo
|
||||
Export.LoGetWingTargets
|
||||
|
||||
These calls are only available on clients when LoIsOwnshipExportAllowed() is true:
|
||||
Export.LoGetPlayerPlaneId
|
||||
Export.LoGetIndicatedAirSpeed
|
||||
Export.LoGetAngleOfAttack
|
||||
Export.LoGetAngleOfSideSlip
|
||||
Export.LoGetAccelerationUnits
|
||||
Export.LoGetVerticalVelocity
|
||||
Export.LoGetADIPitchBankYaw
|
||||
Export.LoGetTrueAirSpeed
|
||||
Export.LoGetAltitudeAboveSeaLevel
|
||||
Export.LoGetAltitudeAboveGroundLevel
|
||||
Export.LoGetMachNumber
|
||||
Export.LoGetRadarAltimeter
|
||||
Export.LoGetMagneticYaw
|
||||
Export.LoGetGlideDeviation
|
||||
Export.LoGetSideDeviation
|
||||
Export.LoGetSlipBallPosition
|
||||
Export.LoGetBasicAtmospherePressure
|
||||
Export.LoGetControlPanel_HSI
|
||||
Export.LoGetEngineInfo
|
||||
Export.LoGetSelfData
|
||||
Export.LoGetCameraPosition
|
||||
Export.LoSetCameraPosition
|
||||
Export.LoSetCommand
|
||||
Export.LoGetMCPState
|
||||
Export.LoGetRoute
|
||||
Export.LoGetNavigationInfo
|
||||
Export.LoGetPayloadInfo
|
||||
Export.LoGetWingInfo
|
||||
Export.LoGetMechInfo
|
||||
Export.LoGetRadioBeaconsStatus
|
||||
Export.LoGetVectorVelocity
|
||||
Export.LoGetVectorWindVelocity
|
||||
Export.LoGetSnares
|
||||
Export.LoGetAngularVelocity
|
||||
Export.LoGetHeightWithObjects
|
||||
Export.LoGetFMData
|
||||
|
||||
These functions are always available:
|
||||
Export.LoGetPilotName
|
||||
Export.LoGetAltitude
|
||||
Export.LoGetNameByType
|
||||
Export.LoGeoCoordinatesToLoCoordinates
|
||||
Export.LoCoordinatesToGeoCoordinates
|
||||
Export.LoGetVersionInfo
|
||||
Export.LoGetWindAtPoint
|
||||
Export.LoGetModelTime
|
||||
Export.LoGetMissionStartTime
|
||||
|
||||
These are not available in the *GameGUI state:
|
||||
-- Export.LoSetSharedTexture
|
||||
-- Export.LoRemoveSharedTexture
|
||||
-- Export.LoUpdateSharedTexture
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
--- The Callbacks.
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
function onMissionLoadBegin()
|
||||
end
|
||||
|
||||
function onMissionLoadProgress(progress, message)
|
||||
end
|
||||
|
||||
function onMissionLoadEnd()
|
||||
end
|
||||
|
||||
|
||||
function onSimulationStart()
|
||||
end
|
||||
|
||||
function onSimulationStop()
|
||||
end
|
||||
|
||||
function onSimulationFrame()
|
||||
end
|
||||
|
||||
function onSimulationPause()
|
||||
end
|
||||
|
||||
function onSimulationResume()
|
||||
end
|
||||
|
||||
|
||||
function onGameEvent(eventName,arg1,arg2,arg3,arg4)
|
||||
--"friendly_fire", playerID, weaponName, victimPlayerID
|
||||
--"mission_end", winner, msg
|
||||
--"kill", killerPlayerID, killerUnitType, killerSide, victimPlayerID, victimUnitType, victimSide, weaponName
|
||||
--"self_kill", playerID
|
||||
--"change_slot", playerID, slotID, prevSide
|
||||
--"connect", playerID, name
|
||||
--"disconnect", playerID, name, playerSide, reason_code
|
||||
--"crash", playerID, unit_missionID
|
||||
--"eject", playerID, unit_missionID
|
||||
--"takeoff", playerID, unit_missionID, airdromeName
|
||||
--"landing", playerID, unit_missionID, airdromeName
|
||||
--"pilot_death", playerID, unit_missionID
|
||||
end
|
||||
|
||||
function onNetConnect(localPlayerID)
|
||||
end
|
||||
|
||||
function onNetMissionChanged(newMissionName)
|
||||
end
|
||||
|
||||
function onNetDisconnect(reason_msg, err_code)
|
||||
end
|
||||
|
||||
-- disconnect reason codes:
|
||||
net.ERR_INVALID_ADDRESS
|
||||
net.ERR_CONNECT_FAILED
|
||||
net.ERR_WRONG_VERSION
|
||||
net.ERR_PROTOCOL_ERROR
|
||||
net.ERR_TAINTED_CLIENT
|
||||
net.ERR_INVALID_PASSWORD
|
||||
net.ERR_BANNED
|
||||
net.ERR_BAD_CALLSIGN
|
||||
|
||||
net.ERR_TIMEOUT
|
||||
net.ERR_KICKED
|
||||
|
||||
|
||||
function onPlayerConnect(id)
|
||||
end
|
||||
|
||||
function onPlayerDisconnect(id, err_code)
|
||||
-- this is never called for local playerID
|
||||
end
|
||||
|
||||
function onPlayerStart(id)
|
||||
-- a player entered the simulation
|
||||
-- this is never called for local playerID
|
||||
end
|
||||
|
||||
function onPlayerStop(id)
|
||||
-- a player left the simulation (happens right before a disconnect, if player exited by desire)
|
||||
-- this is never called for local playerID
|
||||
end
|
||||
|
||||
function onPlayerChangeSlot(id)
|
||||
-- a player successfully changed the slot
|
||||
-- this will also come as onGameEvent('change_slot', playerID, slotID),
|
||||
-- if allowed by server.advanced.event_Connect setting
|
||||
end
|
||||
|
||||
|
||||
--- These 3 functions are different from the rest:
|
||||
--- 1. they are called directly from the network code, so try to make them as fast as possible
|
||||
--- 2. they return a result
|
||||
-- The code shows the default implementations.
|
||||
|
||||
function onPlayerTryConnect(addr, name, ucid, playerID) --> true | false, "disconnect reason"
|
||||
return true
|
||||
end
|
||||
|
||||
function onPlayerTrySendChat(playerID, msg, all) -- -> filteredMessage | "" - empty string drops the message
|
||||
return msg
|
||||
end
|
||||
|
||||
function onPlayerTryChangeSlot(playerID, side, slotID) -- -> true | false
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- GUI callbacks
|
||||
function onChatMessage(message, from)
|
||||
-- this one may be useful for chat archiving
|
||||
end
|
||||
|
||||
function onShowRadioMenu(a_h)
|
||||
end
|
||||
|
||||
function onShowPool()
|
||||
end
|
||||
|
||||
function onShowGameMenu()
|
||||
end
|
||||
|
||||
function onShowBriefing()
|
||||
end
|
||||
|
||||
function onShowChatAll()
|
||||
end
|
||||
|
||||
function onShowChatTeam()
|
||||
end
|
||||
|
||||
function onShowChatRead()
|
||||
end
|
||||
|
||||
function onShowMessage(a_text, a_duration)
|
||||
end
|
||||
|
||||
function onTriggerMessage(message, duration, clearView)
|
||||
end
|
||||
|
||||
function onRadioMessage(message, duration)
|
||||
end
|
||||
|
||||
function onRadioCommand(command_message)
|
||||
end
|
||||
|
||||
===================================================================================================
|
||||
|
||||
Happy hacking!
|
||||
|
||||
Sincerely,
|
||||
dsb at eagle dot ru
|
||||
@ -2610,7 +2610,7 @@ do -- AI_A2A_DISPATCHER
|
||||
|
||||
if Cap then
|
||||
|
||||
local Spawn = DefenderSquadron.Spawn[ math.random( 1, #DefenderSquadron.Spawn ) ] -- Functional.Spawn#SPAWN
|
||||
local Spawn = DefenderSquadron.Spawn[ math.random( 1, #DefenderSquadron.Spawn ) ] -- Core.Spawn#SPAWN
|
||||
local DefenderGrouping = DefenderSquadron.Grouping or self.DefenderDefault.Grouping
|
||||
Spawn:InitGrouping( DefenderGrouping )
|
||||
|
||||
@ -2783,7 +2783,7 @@ do -- AI_A2A_DISPATCHER
|
||||
|
||||
while ( DefendersNeeded > 0 ) do
|
||||
|
||||
local Spawn = DefenderSquadron.Spawn[ math.random( 1, #DefenderSquadron.Spawn ) ] -- Functional.Spawn#SPAWN
|
||||
local Spawn = DefenderSquadron.Spawn[ math.random( 1, #DefenderSquadron.Spawn ) ] -- Core.Spawn#SPAWN
|
||||
local DefenderGrouping = ( DefenderGrouping < DefendersNeeded ) and DefenderGrouping or DefendersNeeded
|
||||
if DefenderGrouping then
|
||||
Spawn:InitGrouping( DefenderGrouping )
|
||||
|
||||
@ -303,7 +303,7 @@ function AI_A2A_PATROL:onafterPatrol( AIPatrol, From, Event, To )
|
||||
|
||||
self:__Route( 1 )
|
||||
|
||||
self.AIPatrol:OnReSpawn(
|
||||
AIPatrol:OnReSpawn(
|
||||
function( PatrolGroup )
|
||||
self:E( "ReSpawn" )
|
||||
self:__Reset( 1 )
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
--- @type AI_BALANCER
|
||||
-- @field Core.Set#SET_CLIENT SetClient
|
||||
-- @field Functional.Spawn#SPAWN SpawnAI
|
||||
-- @field Core.Spawn#SPAWN SpawnAI
|
||||
-- @field Wrapper.Group#GROUP Test
|
||||
-- @extends Core.Fsm#FSM_SET
|
||||
|
||||
@ -106,7 +106,7 @@ AI_BALANCER = {
|
||||
--- Creates a new AI_BALANCER object
|
||||
-- @param #AI_BALANCER self
|
||||
-- @param Core.Set#SET_CLIENT SetClient A SET\_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).
|
||||
-- @param Functional.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed.
|
||||
-- @param Core.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed.
|
||||
-- @return #AI_BALANCER
|
||||
function AI_BALANCER:New( SetClient, SpawnAI )
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
-- @field Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
|
||||
-- @field Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
|
||||
-- @field Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
|
||||
-- @field Functional.Spawn#SPAWN CoordTest
|
||||
-- @field Core.Spawn#SPAWN CoordTest
|
||||
-- @extends Core.Fsm#FSM_CONTROLLABLE
|
||||
|
||||
--- # AI_PATROL_ZONE class, extends @{Fsm#FSM_CONTROLLABLE}
|
||||
|
||||
@ -486,7 +486,8 @@ end
|
||||
function CARGO:IsNear( PointVec2, NearRadius )
|
||||
self:F( { PointVec2, NearRadius } )
|
||||
|
||||
local Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() )
|
||||
--local Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() )
|
||||
local Distance = PointVec2:Get2DDistance( self.CargoObject:GetPointVec2() )
|
||||
self:T( Distance )
|
||||
|
||||
if Distance <= NearRadius then
|
||||
@ -869,9 +870,9 @@ function CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 )
|
||||
local StartPointVec2 = self.CargoCarrier:GetPointVec2()
|
||||
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.
|
||||
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
|
||||
local CargoDeployPointVec2 = StartPointVec2:Translate( Distance, CargoDeployHeading )
|
||||
local CargoDeployCoord = StartPointVec2:Translate( Distance, CargoDeployHeading )
|
||||
|
||||
ToPointVec2 = ToPointVec2 or POINT_VEC2:New( CargoDeployPointVec2:GetX(), CargoDeployPointVec2:GetY() )
|
||||
ToPointVec2 = ToPointVec2 or POINT_VEC2:New( CargoDeployCoord.x, CargoDeployCoord.z )
|
||||
|
||||
-- Respawn the group...
|
||||
if self.CargoObject then
|
||||
|
||||
@ -265,7 +265,7 @@ function MESSAGE:ToCoalition( CoalitionSide, Settings )
|
||||
if CoalitionSide then
|
||||
if self.MessageDuration ~= 0 then
|
||||
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
|
||||
trigger.action.outTextForCoalition( CoalitionSide, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration )
|
||||
trigger.action.outTextForCoalition( CoalitionSide, self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -113,6 +113,38 @@ function SET_BASE:GetSet()
|
||||
return self.Set
|
||||
end
|
||||
|
||||
--- Gets a list of the Names of the Objects in the Set.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
function SET_BASE:GetSetNames() -- R2.3
|
||||
self:F2()
|
||||
|
||||
local Names = {}
|
||||
|
||||
for Name, Object in pairs( self.Set ) do
|
||||
table.insert( Names, Name )
|
||||
end
|
||||
|
||||
return Names
|
||||
end
|
||||
|
||||
|
||||
--- Gets a list of the Objects in the Set.
|
||||
-- @param #SET_BASE self
|
||||
-- @return #SET_BASE self
|
||||
function SET_BASE:GetSetObjects() -- R2.3
|
||||
self:F2()
|
||||
|
||||
local Objects = {}
|
||||
|
||||
for Name, Object in pairs( self.Set ) do
|
||||
table.insert( Objects, Object )
|
||||
end
|
||||
|
||||
return Objects
|
||||
end
|
||||
|
||||
|
||||
--- Adds a @{Base#BASE} object in the @{Set#SET_BASE}, using a given ObjectName as the index.
|
||||
-- @param #SET_BASE self
|
||||
-- @param #string ObjectName
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Functional** -- Spawn dynamically new GROUPs in your missions.
|
||||
--- **Core** -- SPAWN class dynamically spawns new groups of units in your missions.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -55,8 +55,12 @@
|
||||
|
||||
--- # SPAWN class, extends @{Base#BASE}
|
||||
--
|
||||
-- -- 
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The SPAWN class allows to spawn dynamically new groups.
|
||||
-- Each SPAWN object needs to be have a related **template group** setup in the Mission Editor (ME),
|
||||
-- Each SPAWN object needs to be have related **template groups** setup in the Mission Editor (ME),
|
||||
-- which is a normal group with the **Late Activation** flag set.
|
||||
-- This template group will never be activated in your mission.
|
||||
-- SPAWN uses that **template group** to reference to all the characteristics
|
||||
@ -271,8 +275,12 @@ SPAWN = {
|
||||
-- @extends Wrapper.Group#GROUP.Takeoff
|
||||
|
||||
--- @field #SPAWN.Takeoff Takeoff
|
||||
SPAWN.Takeoff = GROUP.Takeoff
|
||||
|
||||
SPAWN.Takeoff = {
|
||||
Air = 1,
|
||||
Runway = 2,
|
||||
Hot = 3,
|
||||
Cold = 4,
|
||||
}
|
||||
|
||||
--- @type SPAWN.SpawnZoneTable
|
||||
-- @list <Core.Zone#ZONE_BASE> SpawnZone
|
||||
@ -521,6 +529,73 @@ function SPAWN:InitRandomizeTemplate( SpawnTemplatePrefixTable )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Randomize templates to be used as the unit representatives for the Spawned group, defined using a SET_GROUP object.
|
||||
-- This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor,
|
||||
-- but they will all follow the same Template route and have the same prefix name.
|
||||
-- In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
|
||||
-- @param #SPAWN self
|
||||
-- @param Core.Set#SET_GROUP SpawnTemplateSet A SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.
|
||||
-- @return #SPAWN
|
||||
-- @usage
|
||||
-- -- NATO Tank Platoons invading Gori.
|
||||
--
|
||||
-- -- Choose between different 'US Tank Platoon Template' configurations to be spawned for the
|
||||
-- -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
|
||||
--
|
||||
-- -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
|
||||
-- -- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
|
||||
--
|
||||
-- Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
|
||||
--
|
||||
-- --- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
|
||||
-- Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
-- Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
-- Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
function SPAWN:InitRandomizeTemplateSet( SpawnTemplateSet ) -- R2.3
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self.SpawnTemplatePrefixTable = SpawnTemplateSet:GetSetNames()
|
||||
self.SpawnRandomizeTemplate = true
|
||||
|
||||
for SpawnGroupID = 1, self.SpawnMaxGroups do
|
||||
self:_RandomizeTemplate( SpawnGroupID )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Randomize templates to be used as the unit representatives for the Spawned group, defined by specifying the prefix names.
|
||||
-- This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor,
|
||||
-- but they will all follow the same Template route and have the same prefix name.
|
||||
-- In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
|
||||
-- @param #SPAWN self
|
||||
-- @param #string SpawnTemplatePrefixes A string or a list of string that contains the prefixes of the groups that are possible unit representatives of the group to be spawned.
|
||||
-- @return #SPAWN
|
||||
-- @usage
|
||||
-- -- NATO Tank Platoons invading Gori.
|
||||
--
|
||||
-- -- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the
|
||||
-- -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
|
||||
--
|
||||
-- -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
|
||||
-- -- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
|
||||
--
|
||||
-- Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
-- Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
-- Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
|
||||
function SPAWN:InitRandomizeTemplatePrefixes( SpawnTemplatePrefixes ) --R2.3
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
local SpawnTemplateSet = SET_GROUP:New():FilterPrefixes( SpawnTemplatePrefixes ):FilterOnce()
|
||||
|
||||
self:InitRandomizeTemplateSet( SpawnTemplateSet )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- When spawning a new group, make the grouping of the units according the InitGrouping setting.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number Grouping Indicates the maximum amount of units in the group.
|
||||
@ -116,6 +116,33 @@ function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory,
|
||||
return self
|
||||
end
|
||||
|
||||
--- Creates a new @{Static} at the original position.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
|
||||
-- @param #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:Spawn( Heading, NewName ) --R2.3
|
||||
self:F( { Heading, NewName } )
|
||||
|
||||
local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID]
|
||||
|
||||
local StaticTemplate = _DATABASE:GetStaticUnitTemplate( self.SpawnTemplatePrefix )
|
||||
|
||||
StaticTemplate.name = NewName or string.format("%s#%05d", self.SpawnTemplatePrefix, self.SpawnIndex )
|
||||
StaticTemplate.heading = ( Heading / 180 ) * math.pi
|
||||
|
||||
StaticTemplate.CountryID = nil
|
||||
StaticTemplate.CoalitionID = nil
|
||||
StaticTemplate.CategoryID = nil
|
||||
|
||||
local Static = coalition.addStaticObject( self.CountryID, StaticTemplate )
|
||||
|
||||
self.SpawnIndex = self.SpawnIndex + 1
|
||||
|
||||
return Static
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Creates a new @{Static} from a POINT_VEC2.
|
||||
-- @param #SPAWNSTATIC self
|
||||
|
||||
93
Moose Development/Moose/Core/UserFlag.lua
Normal file
93
Moose Development/Moose/Core/UserFlag.lua
Normal file
@ -0,0 +1,93 @@
|
||||
--- **Core (WIP)** -- Manage user flags.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- Management of DCS User Flags.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- @module UserFlag
|
||||
|
||||
do -- UserFlag
|
||||
|
||||
--- @type USERFLAG
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # USERFLAG class, extends @{Base#BASE}
|
||||
--
|
||||
-- Management of DCS User Flags.
|
||||
--
|
||||
-- ## 1. USERFLAG constructor
|
||||
--
|
||||
-- * @{#USERFLAG.New}(): Creates a new USERFLAG object.
|
||||
--
|
||||
-- @field #USERFLAG
|
||||
USERFLAG = {
|
||||
ClassName = "USERFLAG",
|
||||
}
|
||||
|
||||
--- USERFLAG Constructor.
|
||||
-- @param #USERFLAG self
|
||||
-- @param #string UserFlagName The name of the userflag, which is a free text string.
|
||||
-- @return #USERFLAG
|
||||
function USERFLAG:New( UserFlagName ) --R2.3
|
||||
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #USERFLAG
|
||||
|
||||
self.UserFlagName = UserFlagName
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set the userflag to a given Number.
|
||||
-- @param #USERFLAG self
|
||||
-- @param #number Number The number value to be checked if it is the same as the userflag.
|
||||
-- @return #USERFLAG The userflag instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERFLAG:New( "VictoryBlue" )
|
||||
-- BlueVictory:Set( 100 ) -- Set the UserFlag VictoryBlue to 100.
|
||||
--
|
||||
function USERFLAG:Set( Number ) --R2.3
|
||||
|
||||
trigger.misc.setUserFlag( self.UserFlagName )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Get the userflag Number.
|
||||
-- @param #USERFLAG self
|
||||
-- @return #number Number The number value to be checked if it is the same as the userflag.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERFLAG:New( "VictoryBlue" )
|
||||
-- local BlueVictoryValue = BlueVictory:Get() -- Get the UserFlag VictoryBlue value.
|
||||
--
|
||||
function USERFLAG:Set( Number ) --R2.3
|
||||
|
||||
return trigger.misc.getUserFlag( self.UserFlagName )
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Check if the userflag has a value of Number.
|
||||
-- @param #USERFLAG self
|
||||
-- @param #number Number The number value to be checked if it is the same as the userflag.
|
||||
-- @return #boolean true if the Number is the value of the userflag.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERFLAG:New( "VictoryBlue" )
|
||||
-- if BlueVictory:Is( 1 ) then
|
||||
-- return "Blue has won"
|
||||
-- end
|
||||
function USERFLAG:Is( Number ) --R2.3
|
||||
|
||||
return trigger.misc.getUserFlag( self.UserFlagName ) == Number
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
129
Moose Development/Moose/Core/UserSound.lua
Normal file
129
Moose Development/Moose/Core/UserSound.lua
Normal file
@ -0,0 +1,129 @@
|
||||
--- **Core (WIP)** -- Manage user sound.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- Management of DCS User Sound.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- @module UserSound
|
||||
|
||||
do -- UserSound
|
||||
|
||||
--- @type USERSOUND
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # USERSOUND class, extends @{Base#BASE}
|
||||
--
|
||||
-- Management of DCS User Sound.
|
||||
--
|
||||
-- ## 1. USERSOUND constructor
|
||||
--
|
||||
-- * @{#USERSOUND.New}(): Creates a new USERSOUND object.
|
||||
--
|
||||
-- @field #USERSOUND
|
||||
USERSOUND = {
|
||||
ClassName = "USERSOUND",
|
||||
}
|
||||
|
||||
--- USERSOUND Constructor.
|
||||
-- @param #USERSOUND self
|
||||
-- @param #string UserSoundFileName The filename of the usersound.
|
||||
-- @return #USERSOUND
|
||||
function USERSOUND:New( UserSoundFileName ) --R2.3
|
||||
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #USERSOUND
|
||||
|
||||
self.UserSoundFileName = UserSoundFileName
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set usersound filename.
|
||||
-- @param #USERSOUND self
|
||||
-- @param #string UserSoundFileName The filename of the usersound.
|
||||
-- @return #USERSOUND The usersound instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
|
||||
-- BlueVictory:SetFileName( "BlueVictoryLoud.ogg" ) -- Set the BlueVictory to change the file name to play a louder sound.
|
||||
--
|
||||
function USERSOUND:SetFileName( UserSoundFileName ) --R2.3
|
||||
|
||||
self.UserSoundFileName = UserSoundFileName
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Play the usersound to all players.
|
||||
-- @param #USERSOUND self
|
||||
-- @return #USERSOUND The usersound instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
|
||||
-- BlueVictory:ToAll() -- Play the sound that Blue has won.
|
||||
--
|
||||
function USERSOUND:ToAll() --R2.3
|
||||
|
||||
trigger.action.outSound( self.UserSoundFileName )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Play the usersound to the given coalition.
|
||||
-- @param #USERSOUND self
|
||||
-- @param Dcs.DCScoalition#coalition Coalition The coalition to play the usersound to.
|
||||
-- @return #USERSOUND The usersound instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
|
||||
-- BlueVictory:ToCoalition( coalition.side.BLUE ) -- Play the sound that Blue has won to the blue coalition.
|
||||
--
|
||||
function USERSOUND:ToCoalition( Coalition ) --R2.3
|
||||
|
||||
trigger.action.outSoundForCoalition(Coalition, self.UserSoundFileName )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Play the usersound to the given country.
|
||||
-- @param #USERSOUND self
|
||||
-- @param Dcs.DCScountry#country Country The country to play the usersound to.
|
||||
-- @return #USERSOUND The usersound instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
|
||||
-- BlueVictory:ToCountry( country.id.USA ) -- Play the sound that Blue has won to the USA country.
|
||||
--
|
||||
function USERSOUND:ToCountry( Country ) --R2.3
|
||||
|
||||
trigger.action.outSoundForCountry( Country, self.UserSoundFileName )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Play the usersound to the given @{Group}.
|
||||
-- @param #USERSOUND self
|
||||
-- @param Wrapper.Group#GROUP Group The @{Group} to play the usersound to.
|
||||
-- @return #USERSOUND The usersound instance.
|
||||
-- @usage
|
||||
-- local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
|
||||
-- local PlayerGroup = GROUP:FindByName( "PlayerGroup" ) -- Search for the active group named "PlayerGroup", that contains a human player.
|
||||
-- BlueVictory:ToGroup( PlayerGroup ) -- Play the sound that Blue has won to the player group.
|
||||
--
|
||||
function USERSOUND:ToGroup( Group ) --R2.3
|
||||
|
||||
trigger.action.outSoundForGroup( Group:GetID(), self.UserSoundFileName )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
end
|
||||
@ -577,10 +577,13 @@ end
|
||||
|
||||
--- Scan the zone
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @param ObjectCategories
|
||||
-- @param Coalition
|
||||
function ZONE_RADIUS:Scan()
|
||||
function ZONE_RADIUS:Scan( ObjectCategories )
|
||||
|
||||
self.Coalitions = {}
|
||||
self.ScanData = {}
|
||||
self.ScanData.Coalitions = {}
|
||||
self.ScanData.Scenery = {}
|
||||
|
||||
local ZoneCoord = self:GetCoordinate()
|
||||
local ZoneRadius = self:GetRadius()
|
||||
@ -595,41 +598,87 @@ function ZONE_RADIUS:Scan()
|
||||
}
|
||||
}
|
||||
|
||||
local function EvaluateZone( ZoneDCSUnit )
|
||||
if ZoneDCSUnit:isExist() then
|
||||
local CategoryDCSUnit = ZoneDCSUnit:getCategory()
|
||||
if ( CategoryDCSUnit == Object.Category.UNIT and ZoneDCSUnit:isActive() ) or
|
||||
CategoryDCSUnit == Object.Category.STATIC then
|
||||
local CoalitionDCSUnit = ZoneDCSUnit:getCoalition()
|
||||
self.Coalitions[CoalitionDCSUnit] = true
|
||||
self:E( { Name = ZoneDCSUnit:getName(), Coalition = CoalitionDCSUnit } )
|
||||
local function EvaluateZone( ZoneObject )
|
||||
if ZoneObject:isExist() then
|
||||
local ObjectCategory = ZoneObject:getCategory()
|
||||
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isActive() ) or
|
||||
ObjectCategory == Object.Category.STATIC then
|
||||
local CoalitionDCSUnit = ZoneObject:getCoalition()
|
||||
self.ScanData.Coalitions[CoalitionDCSUnit] = true
|
||||
self:E( { Name = ZoneObject:getName(), Coalition = CoalitionDCSUnit } )
|
||||
end
|
||||
if ObjectCategory == Object.Category.SCENERY then
|
||||
local SceneryType = ZoneObject:getTypeName()
|
||||
local SceneryName = ZoneObject:getName()
|
||||
self.ScanData.Scenery[SceneryType] = self.ScanData.Scenery[SceneryType] or {}
|
||||
self.ScanData.Scenery[SceneryType][SceneryName] = SCENERY:Register( SceneryName, ZoneObject )
|
||||
self:E( { SCENERY = self.ScanData.Scenery[SceneryType][SceneryName] } )
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
world.searchObjects( { Object.Category.UNIT, Object.Category.STATIC }, SphereSearch, EvaluateZone )
|
||||
world.searchObjects( ObjectCategories, SphereSearch, EvaluateZone )
|
||||
|
||||
end
|
||||
|
||||
|
||||
function ZONE_RADIUS:CountCoalitions()
|
||||
function ZONE_RADIUS:CountScannedCoalitions()
|
||||
|
||||
local Count = 0
|
||||
|
||||
for CoalitionID, Coalition in pairs( self.Coalitions ) do
|
||||
for CoalitionID, Coalition in pairs( self.ScanData.Coalitions ) do
|
||||
Count = Count + 1
|
||||
end
|
||||
return Count
|
||||
end
|
||||
|
||||
|
||||
--- Get Coalitions of the units in the Zone, or Check if there are units of the given Coalition in the Zone.
|
||||
-- Returns nil if there are none ot two Coalitions in the zone!
|
||||
-- Returns one Coalition if there are only Units of one Coalition in the Zone.
|
||||
-- Returns the Coalition for the given Coalition if there are units of the Coalition in the Zone
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @return #table
|
||||
function ZONE_RADIUS:GetScannedCoalition( Coalition )
|
||||
|
||||
if Coalition then
|
||||
return self.ScanData.Coalitions[Coalition]
|
||||
else
|
||||
local Count = 0
|
||||
local ReturnCoalition = nil
|
||||
|
||||
for CoalitionID, Coalition in pairs( self.ScanData.Coalitions ) do
|
||||
Count = Count + 1
|
||||
ReturnCoalition = CoalitionID
|
||||
end
|
||||
|
||||
if Count ~= 1 then
|
||||
ReturnCoalition = nil
|
||||
end
|
||||
|
||||
return ReturnCoalition
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ZONE_RADIUS:GetScannedSceneryType( SceneryType )
|
||||
return self.ScanData.Scenery[SceneryType]
|
||||
end
|
||||
|
||||
|
||||
function ZONE_RADIUS:GetScannedScenery()
|
||||
return self.ScanData.Scenery
|
||||
end
|
||||
|
||||
|
||||
--- Is All in Zone of Coalition?
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @param Coalition
|
||||
-- @return #boolean
|
||||
function ZONE_RADIUS:IsAllInZoneOfCoalition( Coalition )
|
||||
|
||||
return self:CountCoalitions() == 1 and self.Coalitions[Coalition] == true
|
||||
return self:CountScannedCoalitions() == 1 and self:GetScannedCoalition( Coalition ) == true
|
||||
end
|
||||
|
||||
|
||||
@ -639,8 +688,8 @@ end
|
||||
-- @return #boolean
|
||||
function ZONE_RADIUS:IsAllInZoneOfOtherCoalition( Coalition )
|
||||
|
||||
self:E( { Coalitions = self.Coalitions, Count = self:CountCoalitions() } )
|
||||
return self:CountCoalitions() == 1 and self.Coalitions[Coalition] == nil
|
||||
self:E( { Coalitions = self.Coalitions, Count = self:CountScannedCoalitions() } )
|
||||
return self:CountScannedCoalitions() == 1 and self:GetScannedCoalition( Coalition ) == nil
|
||||
end
|
||||
|
||||
|
||||
@ -650,7 +699,7 @@ end
|
||||
-- @return #boolean
|
||||
function ZONE_RADIUS:IsSomeInZoneOfCoalition( Coalition )
|
||||
|
||||
return self:CountCoalitions() > 1 and self.Coalitions[Coalition] == true
|
||||
return self:CountScannedCoalitions() > 1 and self:GetScannedCoalition( Coalition ) == true
|
||||
end
|
||||
|
||||
|
||||
@ -660,7 +709,7 @@ end
|
||||
-- @return #boolean
|
||||
function ZONE_RADIUS:IsNoneInZoneOfCoalition( Coalition )
|
||||
|
||||
return self.Coalitions[Coalition] == nil
|
||||
return self:GetScannedCoalition( Coalition ) == nil
|
||||
end
|
||||
|
||||
|
||||
@ -669,37 +718,17 @@ end
|
||||
-- @return #boolean
|
||||
function ZONE_RADIUS:IsNoneInZone()
|
||||
|
||||
return self:CountCoalitions() == 0
|
||||
return self:CountScannedCoalitions() == 0
|
||||
end
|
||||
|
||||
|
||||
--- Get the Zone Coalitions.
|
||||
-- Returns nil if there are none ot two coalitions in the zone!
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @return Coalitions
|
||||
function ZONE_RADIUS:GetCoalition()
|
||||
|
||||
local Count = 0
|
||||
local ReturnCoalition = nil
|
||||
|
||||
for CoalitionID, Coalition in pairs( self.Coalitions ) do
|
||||
Count = Count + 1
|
||||
ReturnCoalition = CoalitionID
|
||||
end
|
||||
|
||||
if Count ~= 1 then
|
||||
ReturnCoalition = nil
|
||||
end
|
||||
|
||||
return ReturnCoalition
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Searches the zone
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @param ObjectCategories A list of categories, which are members of Object.Category
|
||||
-- @param EvaluateFunction
|
||||
function ZONE_RADIUS:SearchZone( EvaluateFunction )
|
||||
function ZONE_RADIUS:SearchZone( EvaluateFunction, ObjectCategories )
|
||||
|
||||
local SearchZoneResult = true
|
||||
|
||||
@ -1325,7 +1354,7 @@ ZONE_POLYGON = {
|
||||
ClassName="ZONE_POLYGON",
|
||||
}
|
||||
|
||||
--- Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the @{Group#GROUP} defined within the Mission Editor.
|
||||
--- Constructor to create a ZONE_POLYGON instance, taking the zone name and the @{Group#GROUP} defined within the Mission Editor.
|
||||
-- The @{Group#GROUP} waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.
|
||||
-- @param #ZONE_POLYGON self
|
||||
-- @param #string ZoneName Name of the zone.
|
||||
@ -1341,3 +1370,22 @@ function ZONE_POLYGON:New( ZoneName, ZoneGroup )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Constructor to create a ZONE_POLYGON instance, taking the zone name and the **name** of the @{Group#GROUP} defined within the Mission Editor.
|
||||
-- The @{Group#GROUP} waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.
|
||||
-- @param #ZONE_POLYGON self
|
||||
-- @param #string ZoneName Name of the zone.
|
||||
-- @param #string GroupName The group name of the GROUP defining the waypoints within the Mission Editor to define the polygon shape.
|
||||
-- @return #ZONE_POLYGON self
|
||||
function ZONE_POLYGON:NewFromGroupName( ZoneName, GroupName )
|
||||
|
||||
local ZoneGroup = GROUP:FindByName( GroupName )
|
||||
|
||||
local GroupPoints = ZoneGroup:GetTaskRoute()
|
||||
|
||||
local self = BASE:Inherit( self, ZONE_POLYGON_BASE:New( ZoneName, GroupPoints ) )
|
||||
self:F( { ZoneName, ZoneGroup, self._.Polygon } )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
@ -108,6 +108,8 @@ function AIRBASEPOLICE_BASE:New( SetClient, Airbases )
|
||||
)
|
||||
|
||||
self.AirbaseMonitor = SCHEDULER:New( self, self._AirbaseMonitor, {}, 0, 2, 0.05 )
|
||||
|
||||
trigger.action.setUserFlag("SSB",100)
|
||||
|
||||
return self
|
||||
end
|
||||
@ -181,22 +183,9 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
Client:Message( "You are speeding on the taxiway! Slow down or you will be removed from this airbase! Your current velocity is " .. string.format( "%2.0f km/h", Velocity ), 5, "Warning " .. SpeedingWarnings .. " / 3" )
|
||||
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " is being damaged at the airbase, due to a speeding violation ...", 10, "Airbase Police" ):ToAll()
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " is being kicked from the airbase, due to a speeding violation ...", 10, "Airbase Police" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
local function DestroyUntilHeavilyDamaged( Client )
|
||||
local ClientCoord = Client:GetCoordinate()
|
||||
ClientCoord:Explosion( 100 )
|
||||
local Damage = Client:GetLife()
|
||||
local InitialLife = Client:GetLife0()
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " Damage ... " .. Damage, 5, "Airbase Police" ):ToAll()
|
||||
if ( Damage / InitialLife ) * 100 < 80 then
|
||||
Client:ScheduleStop( DestroyUntilHeavilyDamaged )
|
||||
end
|
||||
end
|
||||
Client:ScheduleOnce( 1, DestroyUntilHeavilyDamaged, Client )
|
||||
--Client:ScheduleRepeat( 1, 1, 0, nil, DestroyUntilHeavilyDamaged, Client )
|
||||
--Client:Destroy()
|
||||
trigger.action.setUserFlag( "AIRCRAFT_"..Client:GetID(), 100)
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
end
|
||||
|
||||
@ -88,6 +88,9 @@
|
||||
-- @field #table departure_zones Array containing the names of the departure zones.
|
||||
-- @field #table departure_ports Array containing the names of the destination airports.
|
||||
-- @field #table destination_ports Array containing the names of the destination airports.
|
||||
-- @field #table excluded_ports Array containing the names of explicitly excluded airports.
|
||||
-- @field Core.Zone#ZONE departure_Azone Zone containing the departure airports.
|
||||
-- @field Core.Zone#ZONE destination_Azone Zone containing the destination airports.
|
||||
-- @field #table ratcraft Array with the spawned RAT aircraft.
|
||||
-- @field #number Tinactive Time in seconds after which inactive units will be destroyed. Default is 300 seconds.
|
||||
-- @field #boolean reportstatus Aircraft report status.
|
||||
@ -109,7 +112,7 @@
|
||||
-- @field #string livery Livery of the aircraft set by user.
|
||||
-- @field #string skill Skill of AI.
|
||||
-- @field #boolean ATCswitch Enable/disable ATC if set to true/false.
|
||||
-- @extends Functional.Spawn#SPAWN
|
||||
-- @extends Core.Spawn#SPAWN
|
||||
|
||||
---# RAT class, extends @{Spawn#SPAWN}
|
||||
-- The RAT class implements an easy to use way to randomly fill your map with AI aircraft.
|
||||
@ -284,6 +287,8 @@ RAT={
|
||||
departure_ports={}, -- Array containing the names of the departure airports.
|
||||
destination_ports={}, -- Array containing the names of the destination airports.
|
||||
excluded_ports={}, -- Array containing the names of explicitly excluded airports.
|
||||
departure_Azone=nil, -- Zone containing the departure airports.
|
||||
destination_Azone=nil, -- Zone containing the destination airports.
|
||||
ratcraft={}, -- Array with the spawned RAT aircraft.
|
||||
Tinactive=300, -- Time in seconds after which inactive units will be destroyed. Default is 300 seconds.
|
||||
reportstatus=false, -- Aircraft report status.
|
||||
@ -498,6 +503,16 @@ function RAT:Spawn(naircraft)
|
||||
self.SubMenuName=self.alias
|
||||
end
|
||||
|
||||
-- Get all departure airports inside a Moose zone.
|
||||
if self.departure_Azone~=nil then
|
||||
self.departure_ports=self:_GetAirportsInZone(self.departure_Azone)
|
||||
end
|
||||
|
||||
-- Get all destination airports inside a Moose zone.
|
||||
if self.destination_Azone~=nil then
|
||||
self.destination_ports=self:_GetAirportsInZone(self.destination_Azone)
|
||||
end
|
||||
|
||||
-- debug message
|
||||
local text=string.format("\n******************************************************\n")
|
||||
text=text..string.format("Spawning %i aircraft from template %s of type %s.\n", self.ngroups, self.SpawnTemplatePrefix, self.aircraft.type)
|
||||
@ -607,7 +622,7 @@ end
|
||||
--- Set country of RAT group. This overrules the coalition settings.
|
||||
-- @param #RAT self
|
||||
-- @param #number id DCS country enumerator ID. For example country.id.USA or country.id.RUSSIA.
|
||||
function RAT:SetCoalition2(id)
|
||||
function RAT:SetCountry(id)
|
||||
self.country=id
|
||||
end
|
||||
|
||||
@ -719,6 +734,28 @@ function RAT:SetDestination(names)
|
||||
|
||||
end
|
||||
|
||||
--- Include all airports which lie in a zone as possible destinations.
|
||||
-- @param #RAT self
|
||||
-- @param Core.Zone#ZONE zone Zone in which the airports lie.
|
||||
function RAT:SetDestinationsFromZone(zone)
|
||||
|
||||
-- Random departure is deactivated now that user specified departure ports.
|
||||
self.random_destination=false
|
||||
|
||||
self.destination_Azone=zone
|
||||
end
|
||||
|
||||
--- Include all airports which lie in a zone as possible destinations.
|
||||
-- @param #RAT self
|
||||
-- @param Core.Zone#ZONE zone Zone in which the airports lie.
|
||||
function RAT:SetDeparturesFromZone(zone)
|
||||
-- Random departure is deactivated now that user specified departure ports.
|
||||
self.random_departure=false
|
||||
|
||||
self.departure_Azone=zone
|
||||
end
|
||||
|
||||
|
||||
--- Airports, FARPs and ships explicitly excluded as departures and destinations.
|
||||
-- @param #RAT self
|
||||
-- @param #string ports Name or table of names of excluded airports.
|
||||
@ -1555,7 +1592,7 @@ function RAT:_PickDeparture(takeoff)
|
||||
|
||||
-- All airports specified by user
|
||||
for _,name in pairs(self.departure_ports) do
|
||||
if not self:_Excluded(name) then
|
||||
if self:_IsFriendly(name) and not self:_Excluded(name) then
|
||||
table.insert(departures, AIRBASE:FindByName(name))
|
||||
end
|
||||
end
|
||||
@ -1591,23 +1628,6 @@ end
|
||||
-- @param #boolean _random (Optional) Switch to activate a random selection of airports.
|
||||
-- @return Wrapper.Airbase#AIRBASE Destination airport.
|
||||
function RAT:_PickDestination(destinations, _random)
|
||||
|
||||
--[[
|
||||
-- Take destinations from user input.
|
||||
if not (self.random_destination or _random) then
|
||||
|
||||
destinations=nil
|
||||
destinations={}
|
||||
|
||||
-- All airports specified by user.
|
||||
for _,name in pairs(self.destination_ports) do
|
||||
if not self:_Excluded(name) then
|
||||
table.insert(destinations, AIRBASE:FindByName(name))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
]]
|
||||
|
||||
-- Randomly select one possible destination.
|
||||
local destination=nil
|
||||
@ -1702,6 +1722,23 @@ function RAT:_GetDestinations(departure, q, minrange, maxrange)
|
||||
|
||||
end
|
||||
|
||||
--- Find airports within a zone.
|
||||
-- @param #RAT self
|
||||
-- @param Core.Zone#ZONE zone
|
||||
-- @return #list Table with airport names that lie within the zone.
|
||||
function RAT:_GetAirportsInZone(zone)
|
||||
local airports={}
|
||||
for _,airport in pairs(self.airports) do
|
||||
local name=airport:GetName()
|
||||
local coord=airport:GetCoordinate()
|
||||
|
||||
if zone:IsPointVec3InZone(coord) then
|
||||
table.insert(airports, name)
|
||||
end
|
||||
end
|
||||
return airports
|
||||
end
|
||||
|
||||
--- Check if airport is excluded from possible departures and destinations.
|
||||
-- @param #RAT self
|
||||
-- @param #string port Name of airport, FARP or ship to check.
|
||||
|
||||
@ -102,7 +102,9 @@
|
||||
-- A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens.
|
||||
-- Use the method @{#SCORING.AddGoalScore}() to add a score for a Player at any time in your mission.
|
||||
--
|
||||
-- ## 1.5) Configure fratricide level.
|
||||
-- ## 1.5) (Decommissioned) Configure fratricide level.
|
||||
--
|
||||
-- **This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED**.
|
||||
--
|
||||
-- When a player commits too much damage to friendlies, his penalty score will reach a certain level.
|
||||
-- Use the method @{#SCORING.SetFratricide}() to define the level when a player gets kicked.
|
||||
@ -258,7 +260,7 @@ function SCORING:New( GameName )
|
||||
|
||||
-- Configure Messages
|
||||
self:SetMessagesToAll()
|
||||
self:SetMessagesHit( true )
|
||||
self:SetMessagesHit( false )
|
||||
self:SetMessagesDestroy( true )
|
||||
self:SetMessagesScore( true )
|
||||
self:SetMessagesZone( true )
|
||||
@ -616,6 +618,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:GetTypeName() )
|
||||
end
|
||||
end
|
||||
|
||||
self.Players[PlayerName].UnitName = UnitName
|
||||
self.Players[PlayerName].UnitCoalition = UnitCoalition
|
||||
self.Players[PlayerName].UnitCategory = UnitCategory
|
||||
@ -624,6 +627,8 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
self.Players[PlayerName].ThreatLevel = UnitThreatLevel
|
||||
self.Players[PlayerName].ThreatType = UnitThreatType
|
||||
|
||||
-- TODO: DCS bug concerning Units with skill level client don't get destroyed in multi player. This logic is deactivated until this bug gets fixed.
|
||||
--[[
|
||||
if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then
|
||||
if self.Players[PlayerName].PenaltyWarning < 1 then
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
|
||||
@ -639,11 +644,42 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
):ToAll()
|
||||
UnitData:GetGroup():Destroy()
|
||||
end
|
||||
--]]
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Add a goal score for a player.
|
||||
-- The method takes the Player name for which the Goal score needs to be set.
|
||||
-- The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal.
|
||||
-- A free text can be given that is shown to the players.
|
||||
-- The Score can be both positive and negative.
|
||||
-- @param #SCORING self
|
||||
-- @param #string PlayerName The name of the Player.
|
||||
-- @param #string GoalTag The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).
|
||||
-- @param #string Text A free text that is shown to the players.
|
||||
-- @param #number Score The score can be both positive or negative ( Penalty ).
|
||||
function SCORING:AddGoalScorePlayer( PlayerName, GoalTag, Text, Score )
|
||||
|
||||
self:E( { PlayerName, PlayerName, GoalTag, Text, Score } )
|
||||
|
||||
-- PlayerName can be nil, if the Unit with the player crashed or due to another reason.
|
||||
if PlayerName then
|
||||
local PlayerData = self.Players[PlayerName]
|
||||
|
||||
PlayerData.Goals[GoalTag] = PlayerData.Goals[GoalTag] or { Score = 0 }
|
||||
PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score
|
||||
PlayerData.Score = PlayerData.Score + Score
|
||||
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. Text, MESSAGE.Type.Information ):ToAll()
|
||||
|
||||
self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, nil )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Add a goal score for a player.
|
||||
-- The method takes the PlayerUnit for which the Goal score needs to be set.
|
||||
-- The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal.
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
--- **Functional (wIP)** -- Base class that models processes to capture a Zone for a Coalition, guarded by another Coalition.
|
||||
--- **Functional (wIP)** -- Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- ZONE_CAPTURE_COALITION models processes that have an objective with a defined achievement involving a Zone. Derived classes implement the ways how the achievements can be realized.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
--
|
||||
-- ====
|
||||
@ -20,7 +16,14 @@ do -- ZoneGoal
|
||||
|
||||
--- # ZONE_CAPTURE_COALITION class, extends @{ZoneGoalCoalition#ZONE_GOAL_COALITION}
|
||||
--
|
||||
-- ZONE_CAPTURE_COALITION models processes that have an objective with a defined achievement involving a Zone. Derived classes implement the ways how the achievements can be realized.
|
||||
-- Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.
|
||||
--
|
||||
-- The Zone is initially **Guarded** by the __owning coalition__, which is the coalition that initially occupies the zone with units of its coalition.
|
||||
-- Once units of an other coalition are entering the Zone, the state will change to **Attacked**. As long as these units remain in the zone, the state keeps set to Attacked.
|
||||
-- When all units are destroyed in the Zone, the state will change to **Empty**, which expresses that the Zone is empty, and can be captured.
|
||||
-- When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to **Captured**.
|
||||
--
|
||||
-- Event handlers can be defined by the mission designer to action on the state transitions.
|
||||
--
|
||||
-- ## 1. ZONE_CAPTURE_COALITION constructor
|
||||
--
|
||||
@ -30,8 +33,18 @@ do -- ZoneGoal
|
||||
--
|
||||
-- ### 2.1 ZONE_CAPTURE_COALITION States
|
||||
--
|
||||
-- * **Captured**: The Zone has been captured by an other coalition.
|
||||
-- * **Attacked**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guarded**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- ### 2.2 ZONE_CAPTURE_COALITION Events
|
||||
--
|
||||
-- * **Capture**: The Zone has been captured by an other coalition.
|
||||
-- * **Attack**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guard**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- @field #ZONE_CAPTURE_COALITION
|
||||
ZONE_CAPTURE_COALITION = {
|
||||
ClassName = "ZONE_CAPTURE_COALITION",
|
||||
@ -50,7 +63,190 @@ do -- ZoneGoal
|
||||
local self = BASE:Inherit( self, ZONE_GOAL_COALITION:New( Zone, Coalition ) ) -- #ZONE_CAPTURE_COALITION
|
||||
|
||||
self:F( { Zone = Zone, Coalition = Coalition } )
|
||||
|
||||
do
|
||||
|
||||
--- Captured State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveCaptured
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Captured State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterCaptured
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
|
||||
--- Attacked State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveAttacked
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attacked State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterAttacked
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
--- Guarded State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveGuarded
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guarded State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterGuarded
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
|
||||
--- Empty State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
self:AddTransition( "*", "Guard", "Guarded" )
|
||||
|
||||
--- Guard Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeGuard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guard Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterGuard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Guard Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Guard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Guard Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Guard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*", "Empty", "Empty" )
|
||||
|
||||
--- Empty Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Empty Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Empty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Empty Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Empty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
self:AddTransition( { "Guarded", "Empty" }, "Attack", "Attacked" )
|
||||
|
||||
--- Attack Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeAttack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attack Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterAttack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Attack Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Attack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Attack Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Attack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( { "Guarded", "Attacked", "Empty" }, "Capture", "Captured" )
|
||||
|
||||
--- Capture Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeCapture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Capture Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterCapture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Capture Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Capture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Capture Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Capture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -62,6 +258,166 @@ do -- ZoneGoal
|
||||
|
||||
self.Goal:Achieved()
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsGuarded()
|
||||
|
||||
local IsGuarded = self.Zone:IsAllInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsGuarded = IsGuarded } )
|
||||
return IsGuarded
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsEmpty()
|
||||
|
||||
local IsEmpty = self.Zone:IsNoneInZone()
|
||||
self:E( { IsEmpty = IsEmpty } )
|
||||
return IsEmpty
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsCaptured()
|
||||
|
||||
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
|
||||
self:E( { IsCaptured = IsCaptured } )
|
||||
return IsCaptured
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsAttacked()
|
||||
|
||||
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsAttacked = IsAttacked } )
|
||||
return IsAttacked
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Mark.
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
function ZONE_CAPTURE_COALITION:Mark()
|
||||
|
||||
local Coord = self.Zone:GetCoordinate()
|
||||
local ZoneName = self:GetZoneName()
|
||||
local State = self:GetState()
|
||||
|
||||
if self.MarkRed and self.MarkBlue then
|
||||
self:E( { MarkRed = self.MarkRed, MarkBlue = self.MarkBlue } )
|
||||
Coord:RemoveMark( self.MarkRed )
|
||||
Coord:RemoveMark( self.MarkBlue )
|
||||
end
|
||||
|
||||
if self.Coalition == coalition.side.BLUE then
|
||||
self.MarkBlue = Coord:MarkToCoalitionBlue( "Coalition: Blue\nGuard Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
self.MarkRed = Coord:MarkToCoalitionRed( "Coalition: Blue\nCapture Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
else
|
||||
self.MarkRed = Coord:MarkToCoalitionRed( "Coalition: Red\nGuard Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
self.MarkBlue = Coord:MarkToCoalitionBlue( "Coalition: Red\nCapture Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
end
|
||||
end
|
||||
|
||||
--- Bound.
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
function ZONE_CAPTURE_COALITION:onenterGuarded()
|
||||
|
||||
--self:GetParent( self ):onenterGuarded()
|
||||
|
||||
if self.Coalition == coalition.side.BLUE then
|
||||
--elf.ProtectZone:BoundZone( 12, country.id.USA )
|
||||
else
|
||||
--self.ProtectZone:BoundZone( 12, country.id.RUSSIA )
|
||||
end
|
||||
|
||||
self:Mark()
|
||||
|
||||
end
|
||||
|
||||
function ZONE_CAPTURE_COALITION:onenterCaptured()
|
||||
|
||||
--self:GetParent( self ):onenterCaptured()
|
||||
|
||||
local NewCoalition = self.Zone:GetScannedCoalition()
|
||||
self:E( { NewCoalition = NewCoalition } )
|
||||
self:SetCoalition( NewCoalition )
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:onenterEmpty()
|
||||
|
||||
--self:GetParent( self ):onenterEmpty()
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:onenterAttacked()
|
||||
|
||||
--self:GetParent( self ):onenterAttacked()
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
--- When started, check the Coalition status.
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
function ZONE_CAPTURE_COALITION:onafterGuard()
|
||||
|
||||
--self:E({BASE:GetParent( self )})
|
||||
--BASE:GetParent( self ).onafterGuard( self )
|
||||
|
||||
if not self.SmokeScheduler then
|
||||
self.SmokeScheduler = self:ScheduleRepeat( 1, 1, 0.1, nil, self.StatusSmoke, self )
|
||||
end
|
||||
if not self.ScheduleStatusZone then
|
||||
self.ScheduleStatusZone = self:ScheduleRepeat( 15, 15, 0.1, nil, self.StatusZone, self )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsCaptured()
|
||||
|
||||
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
|
||||
self:E( { IsCaptured = IsCaptured } )
|
||||
return IsCaptured
|
||||
end
|
||||
|
||||
|
||||
function ZONE_CAPTURE_COALITION:IsAttacked()
|
||||
|
||||
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsAttacked = IsAttacked } )
|
||||
return IsAttacked
|
||||
end
|
||||
|
||||
|
||||
--- Check status Coalition ownership.
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
function ZONE_CAPTURE_COALITION:StatusZone()
|
||||
|
||||
local State = self:GetState()
|
||||
self:E( { State = self:GetState() } )
|
||||
|
||||
self:GetParent( self, ZONE_CAPTURE_COALITION ).StatusZone( self )
|
||||
|
||||
if State ~= "Guarded" and self:IsGuarded() then
|
||||
self:Guard()
|
||||
end
|
||||
|
||||
if State ~= "Empty" and self:IsEmpty() then
|
||||
self:Empty()
|
||||
end
|
||||
|
||||
if State ~= "Attacked" and self:IsAttacked() then
|
||||
self:Attack()
|
||||
end
|
||||
|
||||
if State ~= "Captured" and self:IsCaptured() then
|
||||
self:Capture()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -31,19 +31,9 @@ do -- ZoneGoal
|
||||
-- ## 2. ZONE_GOAL_COALITION is a finite state machine (FSM).
|
||||
--
|
||||
-- ### 2.1 ZONE_GOAL_COALITION States
|
||||
--
|
||||
-- * **Captured**: The Zone has been captured by an other coalition.
|
||||
-- * **Attacked**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guarded**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- ### 2.2 ZONE_GOAL_COALITION Events
|
||||
--
|
||||
-- * **Capture**: The Zone has been captured by an other coalition.
|
||||
-- * **Attack**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guard**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- ### 2.3 ZONE_GOAL_COALITION State Machine
|
||||
--
|
||||
-- @field #ZONE_GOAL_COALITION
|
||||
@ -66,188 +56,6 @@ do -- ZoneGoal
|
||||
|
||||
self:SetCoalition( Coalition )
|
||||
|
||||
do
|
||||
|
||||
--- Captured State Handler OnLeave for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnLeaveCaptured
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Captured State Handler OnEnter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnEnterCaptured
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
|
||||
--- Attacked State Handler OnLeave for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnLeaveAttacked
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attacked State Handler OnEnter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnEnterAttacked
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
--- Guarded State Handler OnLeave for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnLeaveGuarded
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guarded State Handler OnEnter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnEnterGuarded
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
|
||||
--- Empty State Handler OnLeave for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnLeaveEmpty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty State Handler OnEnter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnEnterEmpty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
end
|
||||
|
||||
self:AddTransition( "*", "Guard", "Guarded" )
|
||||
|
||||
--- Guard Handler OnBefore for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnBeforeGuard
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guard Handler OnAfter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnAfterGuard
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Guard Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] Guard
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
|
||||
--- Guard Asynchronous Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] __Guard
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*", "Empty", "Empty" )
|
||||
|
||||
--- Empty Handler OnBefore for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnBeforeEmpty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty Handler OnAfter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnAfterEmpty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Empty Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] Empty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
|
||||
--- Empty Asynchronous Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] __Empty
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
self:AddTransition( { "Guarded", "Empty" }, "Attack", "Attacked" )
|
||||
|
||||
--- Attack Handler OnBefore for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnBeforeAttack
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attack Handler OnAfter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnAfterAttack
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Attack Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] Attack
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
|
||||
--- Attack Asynchronous Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] __Attack
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( { "Guarded", "Attacked", "Empty" }, "Capture", "Captured" )
|
||||
|
||||
--- Capture Handler OnBefore for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnBeforeCapture
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Capture Handler OnAfter for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] OnAfterCapture
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Capture Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] Capture
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
|
||||
--- Capture Asynchronous Trigger for ZONE_GOAL_COALITION
|
||||
-- @function [parent=#ZONE_GOAL_COALITION] __Capture
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
return self
|
||||
end
|
||||
@ -290,137 +98,6 @@ do -- ZoneGoal
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsGuarded()
|
||||
|
||||
local IsGuarded = self.Zone:IsAllInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsGuarded = IsGuarded } )
|
||||
return IsGuarded
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsEmpty()
|
||||
|
||||
local IsEmpty = self.Zone:IsNoneInZone()
|
||||
self:E( { IsEmpty = IsEmpty } )
|
||||
return IsEmpty
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsCaptured()
|
||||
|
||||
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
|
||||
self:E( { IsCaptured = IsCaptured } )
|
||||
return IsCaptured
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsAttacked()
|
||||
|
||||
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsAttacked = IsAttacked } )
|
||||
return IsAttacked
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Mark.
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
function ZONE_GOAL_COALITION:Mark()
|
||||
|
||||
local Coord = self.Zone:GetCoordinate()
|
||||
local ZoneName = self:GetZoneName()
|
||||
local State = self:GetState()
|
||||
|
||||
if self.MarkRed and self.MarkBlue then
|
||||
self:E( { MarkRed = self.MarkRed, MarkBlue = self.MarkBlue } )
|
||||
Coord:RemoveMark( self.MarkRed )
|
||||
Coord:RemoveMark( self.MarkBlue )
|
||||
end
|
||||
|
||||
if self.Coalition == coalition.side.BLUE then
|
||||
self.MarkBlue = Coord:MarkToCoalitionBlue( "Guard Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
self.MarkRed = Coord:MarkToCoalitionRed( "Capture Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
else
|
||||
self.MarkRed = Coord:MarkToCoalitionRed( "Guard Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
self.MarkBlue = Coord:MarkToCoalitionBlue( "Capture Zone: " .. ZoneName .. "\nStatus: " .. State )
|
||||
end
|
||||
end
|
||||
|
||||
--- Bound.
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
function ZONE_GOAL_COALITION:onenterGuarded()
|
||||
|
||||
--self:GetParent( self ):onenterGuarded()
|
||||
|
||||
if self.Coalition == coalition.side.BLUE then
|
||||
--elf.ProtectZone:BoundZone( 12, country.id.USA )
|
||||
else
|
||||
--self.ProtectZone:BoundZone( 12, country.id.RUSSIA )
|
||||
end
|
||||
|
||||
self:Mark()
|
||||
|
||||
end
|
||||
|
||||
function ZONE_GOAL_COALITION:onenterCaptured()
|
||||
|
||||
--self:GetParent( self ):onenterCaptured()
|
||||
|
||||
local NewCoalition = self.Zone:GetCoalition()
|
||||
self:E( { NewCoalition = NewCoalition } )
|
||||
self:SetCoalition( NewCoalition )
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:onenterEmpty()
|
||||
|
||||
--self:GetParent( self ):onenterEmpty()
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:onenterAttacked()
|
||||
|
||||
--self:GetParent( self ):onenterAttacked()
|
||||
|
||||
self:Mark()
|
||||
end
|
||||
|
||||
|
||||
--- When started, check the Coalition status.
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
function ZONE_GOAL_COALITION:onafterGuard()
|
||||
|
||||
--self:E({BASE:GetParent( self )})
|
||||
--BASE:GetParent( self ).onafterGuard( self )
|
||||
|
||||
if not self.SmokeScheduler then
|
||||
self.SmokeScheduler = self:ScheduleRepeat( 1, 1, 0.1, nil, self.StatusSmoke, self )
|
||||
end
|
||||
if not self.ScheduleStatusZone then
|
||||
self.ScheduleStatusZone = self:ScheduleRepeat( 15, 15, 0.1, nil, self.StatusZone, self )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsCaptured()
|
||||
|
||||
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
|
||||
self:E( { IsCaptured = IsCaptured } )
|
||||
return IsCaptured
|
||||
end
|
||||
|
||||
|
||||
function ZONE_GOAL_COALITION:IsAttacked()
|
||||
|
||||
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
|
||||
self:E( { IsAttacked = IsAttacked } )
|
||||
return IsAttacked
|
||||
end
|
||||
|
||||
--- Check status Coalition ownership.
|
||||
-- @param #ZONE_GOAL_COALITION self
|
||||
function ZONE_GOAL_COALITION:StatusZone()
|
||||
@ -428,24 +105,8 @@ do -- ZoneGoal
|
||||
local State = self:GetState()
|
||||
self:E( { State = self:GetState() } )
|
||||
|
||||
self.Zone:Scan()
|
||||
self.Zone:Scan( { Object.Category.UNIT, Object.Category.STATIC } )
|
||||
|
||||
if State ~= "Guarded" and self:IsGuarded() then
|
||||
self:Guard()
|
||||
end
|
||||
|
||||
if State ~= "Empty" and self:IsEmpty() then
|
||||
self:Empty()
|
||||
end
|
||||
|
||||
if State ~= "Attacked" and self:IsAttacked() then
|
||||
self:Attack()
|
||||
end
|
||||
|
||||
if State ~= "Captured" and self:IsCaptured() then
|
||||
self:Capture()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -79,7 +79,8 @@ function OBJECT:Destroy()
|
||||
local DCSObject = self:GetDCSObject()
|
||||
|
||||
if DCSObject then
|
||||
|
||||
USERFLAG:New( self:GetGroup():GetName() ):Set( 100 )
|
||||
--BASE:CreateEventCrash( timer.getTime(), DCSObject )
|
||||
DCSObject:destroy()
|
||||
end
|
||||
|
||||
|
||||
@ -415,7 +415,7 @@ function POSITIONABLE:GetMessageText( Message, Name ) --R2.1 added
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
Name = Name and ( " => " .. Name ) or ""
|
||||
Name = Name and ( " (" .. Name .. ")" ) or ""
|
||||
local Callsign = string.format( "%s", self:GetCallsign() ~= "" and self:GetCallsign() or self:GetName() )
|
||||
local MessageText = string.format("[%s%s]: %s", Callsign, Name, Message )
|
||||
return MessageText
|
||||
@ -489,12 +489,6 @@ function POSITIONABLE:MessageToCoalition( Message, Duration, MessageCoalition )
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
if MessageCoalition == coalition.side.BLUE then
|
||||
Name = "Blue coalition"
|
||||
end
|
||||
if MessageCoalition == coalition.side.RED then
|
||||
Name = "Red coalition"
|
||||
end
|
||||
self:GetMessage( Message, Duration, Name ):ToCoalition( MessageCoalition )
|
||||
end
|
||||
|
||||
@ -515,12 +509,6 @@ function POSITIONABLE:MessageTypeToCoalition( Message, MessageType, MessageCoali
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
if MessageCoalition == coalition.side.BLUE then
|
||||
Name = "Blue coalition"
|
||||
end
|
||||
if MessageCoalition == coalition.side.RED then
|
||||
Name = "Red coalition"
|
||||
end
|
||||
self:GetMessageType( Message, MessageType, Name ):ToCoalition( MessageCoalition )
|
||||
end
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ Utilities/Routines.lua
|
||||
Utilities/Utils.lua
|
||||
|
||||
Core/Base.lua
|
||||
Core/UserFlag.lua
|
||||
Core/UserSound.lua
|
||||
Core/Report.lua
|
||||
Core/Scheduler.lua
|
||||
Core/ScheduleDispatcher.lua
|
||||
@ -15,6 +17,7 @@ Core/Point.lua
|
||||
Core/Message.lua
|
||||
Core/Fsm.lua
|
||||
Core/Radio.lua
|
||||
Core/Spawn.lua
|
||||
Core/SpawnStatic.lua
|
||||
Core/Goal.lua
|
||||
Core/Cargo.lua
|
||||
@ -33,7 +36,6 @@ Wrapper/Scenery.lua
|
||||
|
||||
Functional/Scoring.lua
|
||||
Functional/CleanUp.lua
|
||||
Functional/Spawn.lua
|
||||
Functional/Movement.lua
|
||||
Functional/Sead.lua
|
||||
Functional/Escort.lua
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -1103,7 +1105,7 @@ function below will use the range 1-7 just in case</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(DESIGNATE).LaseDuration" >
|
||||
<strong>DESIGNATE.LaseDuration</strong>
|
||||
</a>
|
||||
@ -1157,7 +1159,6 @@ function below will use the range 1-7 just in case</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DESIGNATE).LaserCodes" >
|
||||
<strong>DESIGNATE.LaserCodes</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -2466,6 +2468,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemCount" >
|
||||
<strong>DETECTION_BASE.DetectedItemCount</strong>
|
||||
</a>
|
||||
@ -2479,6 +2482,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemMax" >
|
||||
<strong>DETECTION_BASE.DetectedItemMax</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -1605,7 +1607,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<em></em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1904,6 +1906,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -327,18 +329,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetCoalition">RAT:SetCoalition(friendly)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set the friendly coalitions from which the airports can be used as departure and destination.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetCoalition2">RAT:SetCoalition2(id)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set country of RAT group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetCoalitionAircraft">RAT:SetCoalitionAircraft(color)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set coalition of RAT group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetCountry">RAT:SetCountry(id)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set country of RAT group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -351,6 +353,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetDeparture">RAT:SetDeparture(names)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set possible departure ports.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetDeparturesFromZone">RAT:SetDeparturesFromZone(zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Include all airports which lie in a zone as possible destinations.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -363,6 +371,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetDestination">RAT:SetDestination(names)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set name of destination airport for the AI aircraft.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).SetDestinationsFromZone">RAT:SetDestinationsFromZone(zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Include all airports which lie in a zone as possible destinations.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -597,6 +611,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT)._FLmax">RAT:_FLmax(alpha, beta, d, phi, h0)</a></td>
|
||||
<td class="summary">
|
||||
<p>Calculate the max flight level for a given distance and fixed climb and descent rates.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT)._GetAirportsInZone">RAT:_GetAirportsInZone(zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Find airports within a zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -861,6 +881,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).debug">RAT.debug</a></td>
|
||||
<td class="summary">
|
||||
<p>Turn debug messages on or off.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).departure_Azone">RAT.departure_Azone</a></td>
|
||||
<td class="summary">
|
||||
<p>Zone containing the departure airports.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -873,6 +899,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).departure_zones">RAT.departure_zones</a></td>
|
||||
<td class="summary">
|
||||
<p>Array containing the names of the departure zones.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).destination_Azone">RAT.destination_Azone</a></td>
|
||||
<td class="summary">
|
||||
<p>Zone containing the destination airports.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -884,7 +916,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(RAT).excluded_ports">RAT.excluded_ports</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Array containing the names of explicitly excluded airports.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1704,31 +1736,6 @@ Default is "same", so aircraft will use airports of the coalition their spawn te
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetCoalition2" >
|
||||
<strong>RAT:SetCoalition2(id)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set country of RAT group.</p>
|
||||
|
||||
|
||||
<p>This overrules the coalition settings.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number id </em></code>:
|
||||
DCS country enumerator ID. For example country.id.USA or country.id.RUSSIA.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetCoalitionAircraft" >
|
||||
<strong>RAT:SetCoalitionAircraft(color)</strong>
|
||||
</a>
|
||||
@ -1754,6 +1761,31 @@ Color of coalition, i.e. "red" or blue".</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetCountry" >
|
||||
<strong>RAT:SetCountry(id)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set country of RAT group.</p>
|
||||
|
||||
|
||||
<p>This overrules the coalition settings.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number id </em></code>:
|
||||
DCS country enumerator ID. For example country.id.USA or country.id.RUSSIA.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetCruiseAltitude" >
|
||||
<strong>RAT:SetCruiseAltitude(alt)</strong>
|
||||
</a>
|
||||
@ -1811,6 +1843,28 @@ Name or table of names of departure airports or zones.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetDeparturesFromZone" >
|
||||
<strong>RAT:SetDeparturesFromZone(zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Include all airports which lie in a zone as possible destinations.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> zone </em></code>:
|
||||
Zone in which the airports lie.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetDescentAngle" >
|
||||
<strong>RAT:SetDescentAngle(angle)</strong>
|
||||
</a>
|
||||
@ -1864,6 +1918,28 @@ Name of the destination airport or table of destination airports.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetDestinationsFromZone" >
|
||||
<strong>RAT:SetDestinationsFromZone(zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Include all airports which lie in a zone as possible destinations.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> zone </em></code>:
|
||||
Zone in which the airports lie.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT).SetFL" >
|
||||
<strong>RAT:SetFL(height)</strong>
|
||||
</a>
|
||||
@ -2804,6 +2880,32 @@ Maximal flight level in meters.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT)._GetAirportsInZone" >
|
||||
<strong>RAT:_GetAirportsInZone(zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Find airports within a zone.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(list)">#list</a>:</em>
|
||||
Table with airport names that lie within the zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RAT)._GetAirportsOfCoalition" >
|
||||
<strong>RAT:_GetAirportsOfCoalition()</strong>
|
||||
</a>
|
||||
@ -3929,6 +4031,20 @@ Waypoints for DCS task route or spawn template.</p>
|
||||
|
||||
<p>Turn debug messages on or off.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></em>
|
||||
<a id="#(RAT).departure_Azone" >
|
||||
<strong>RAT.departure_Azone</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Zone containing the departure airports.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -3957,6 +4073,20 @@ Waypoints for DCS task route or spawn template.</p>
|
||||
|
||||
<p>Array containing the names of the departure zones.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a></em>
|
||||
<a id="#(RAT).destination_Azone" >
|
||||
<strong>RAT.destination_Azone</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Zone containing the destination airports.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -3976,14 +4106,14 @@ Waypoints for DCS task route or spawn template.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#table</em>
|
||||
<a id="#(RAT).excluded_ports" >
|
||||
<strong>RAT.excluded_ports</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>Array containing the names of explicitly excluded airports.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -223,7 +225,9 @@ just large enough around that building.</p>
|
||||
<p>A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens.
|
||||
Use the method <a href="##(SCORING).AddGoalScore">SCORING.AddGoalScore</a>() to add a score for a Player at any time in your mission.</p>
|
||||
|
||||
<h2>1.5) Configure fratricide level.</h2>
|
||||
<h2>1.5) (Decommissioned) Configure fratricide level.</h2>
|
||||
|
||||
<p><strong>This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED</strong>.</p>
|
||||
|
||||
<p>When a player commits too much damage to friendlies, his penalty score will reach a certain level.
|
||||
Use the method <a href="##(SCORING).SetFratricide">SCORING.SetFratricide</a>() to define the level when a player gets kicked. <br/>
|
||||
@ -373,6 +377,12 @@ Various methods exist to configure:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).AddGoalScore">SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a goal score for a player.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).AddGoalScorePlayer">SCORING:AddGoalScorePlayer(PlayerName, GoalTag, Text, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a goal score for a player.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -868,6 +878,52 @@ The score can be both positive or negative ( Penalty ).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).AddGoalScorePlayer" >
|
||||
<strong>SCORING:AddGoalScorePlayer(PlayerName, GoalTag, Text, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add a goal score for a player.</p>
|
||||
|
||||
|
||||
<p>The method takes the Player name for which the Goal score needs to be set.
|
||||
The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal.
|
||||
A free text can be given that is shown to the players.
|
||||
The Score can be both positive and negative.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerName </em></code>:
|
||||
The name of the Player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string GoalTag </em></code>:
|
||||
The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Text </em></code>:
|
||||
A free text that is shown to the players.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Score </em></code>:
|
||||
The score can be both positive or negative ( Penalty ).</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).AddScoreGroup" >
|
||||
<strong>SCORING:AddScoreGroup(ScoreGroup, Score)</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -458,6 +460,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).GetSet">SET_BASE:GetSet()</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets the Set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).GetSetNames">SET_BASE:GetSetNames()</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets a list of the Names of the Objects in the Set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).GetSetObjects">SET_BASE:GetSetObjects()</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets a list of the Objects in the Set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -2595,6 +2609,42 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_BASE).GetSetNames" >
|
||||
<strong>SET_BASE:GetSetNames()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Gets a list of the Names of the Objects in the Set.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_BASE).GetSetObjects" >
|
||||
<strong>SET_BASE:GetSetObjects()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Gets a list of the Objects in the Set.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_BASE).IsIncludeObject" >
|
||||
<strong>SET_BASE:IsIncludeObject(Object)</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -1247,7 +1249,7 @@ true if metric.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<em></em>
|
||||
<a id="#(SETTINGS).Metric" >
|
||||
<strong>SETTINGS.Metric</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -2192,9 +2194,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2769,9 +2768,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -3193,7 +3189,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -175,6 +177,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).Spawn">SPAWNSTATIC:Spawn(Heading, (, NewName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new <a href="Static.html">Static</a> at the original position.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -350,6 +358,44 @@ is the name of the type.</p>
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWNSTATIC).Spawn" >
|
||||
<strong>SPAWNSTATIC:Spawn(Heading, (, NewName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new <a href="Static.html">Static</a> at the original position.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Heading </em></code>:
|
||||
The heading of the static, which is a number in degrees from 0 to 360.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ( </em></code>:
|
||||
ptional) The name of the new static.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> NewName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
@ -772,6 +774,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).ScheduleID" >
|
||||
<strong>SPOT.ScheduleID</strong>
|
||||
</a>
|
||||
@ -785,6 +788,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).SpotIR" >
|
||||
<strong>SPOT.SpotIR</strong>
|
||||
</a>
|
||||
@ -798,6 +802,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).SpotLaser" >
|
||||
<strong>SPOT.SpotLaser</strong>
|
||||
</a>
|
||||
@ -811,6 +816,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).Target" >
|
||||
<strong>SPOT.Target</strong>
|
||||
</a>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="UserFlag.html">UserFlag</a></li>
|
||||
<li><a href="UserSound.html">UserSound</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user