mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into funkyfranky
This commit is contained in:
commit
70e5ce30bb
@ -3326,6 +3326,405 @@ function SET_CLIENT:IsIncludeObject( MClient )
|
||||
return MClientInclude
|
||||
end
|
||||
|
||||
--- SET_PLAYER
|
||||
|
||||
|
||||
--- @type SET_PLAYER
|
||||
-- @extends Core.Set#SET_BASE
|
||||
|
||||
|
||||
|
||||
--- # 4) SET_PLAYER class, extends @{Set#SET_BASE}
|
||||
--
|
||||
-- Mission designers can use the @{Set#SET_PLAYER} class to build sets of units belonging to alive players:
|
||||
--
|
||||
-- ## 4.1) SET_PLAYER constructor
|
||||
--
|
||||
-- Create a new SET_PLAYER object with the @{#SET_PLAYER.New} method:
|
||||
--
|
||||
-- * @{#SET_PLAYER.New}: Creates a new SET_PLAYER object.
|
||||
--
|
||||
-- ## 4.3) SET_PLAYER filter criteria
|
||||
--
|
||||
-- You can set filter criteria to define the set of clients within the SET_PLAYER.
|
||||
-- Filter criteria are defined by:
|
||||
--
|
||||
-- * @{#SET_PLAYER.FilterCoalitions}: Builds the SET_PLAYER with the clients belonging to the coalition(s).
|
||||
-- * @{#SET_PLAYER.FilterCategories}: Builds the SET_PLAYER with the clients belonging to the category(ies).
|
||||
-- * @{#SET_PLAYER.FilterTypes}: Builds the SET_PLAYER with the clients belonging to the client type(s).
|
||||
-- * @{#SET_PLAYER.FilterCountries}: Builds the SET_PLAYER with the clients belonging to the country(ies).
|
||||
-- * @{#SET_PLAYER.FilterPrefixes}: Builds the SET_PLAYER with the clients starting with the same prefix string(s).
|
||||
--
|
||||
-- Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:
|
||||
--
|
||||
-- * @{#SET_PLAYER.FilterStart}: Starts the filtering of the clients within the SET_PLAYER.
|
||||
--
|
||||
-- Planned filter criteria within development are (so these are not yet available):
|
||||
--
|
||||
-- * @{#SET_PLAYER.FilterZones}: Builds the SET_PLAYER with the clients within a @{Zone#ZONE}.
|
||||
--
|
||||
-- ## 4.4) SET_PLAYER iterators
|
||||
--
|
||||
-- Once the filters have been defined and the SET_PLAYER has been built, you can iterate the SET_PLAYER with the available iterator methods.
|
||||
-- The iterator methods will walk the SET_PLAYER set, and call for each element within the set a function that you provide.
|
||||
-- The following iterator methods are currently available within the SET_PLAYER:
|
||||
--
|
||||
-- * @{#SET_PLAYER.ForEachClient}: Calls a function for each alive client it finds within the SET_PLAYER.
|
||||
--
|
||||
-- ===
|
||||
-- @field #SET_PLAYER SET_PLAYER
|
||||
SET_PLAYER = {
|
||||
ClassName = "SET_PLAYER",
|
||||
Clients = {},
|
||||
Filter = {
|
||||
Coalitions = nil,
|
||||
Categories = nil,
|
||||
Types = nil,
|
||||
Countries = nil,
|
||||
ClientPrefixes = nil,
|
||||
},
|
||||
FilterMeta = {
|
||||
Coalitions = {
|
||||
red = coalition.side.RED,
|
||||
blue = coalition.side.BLUE,
|
||||
neutral = coalition.side.NEUTRAL,
|
||||
},
|
||||
Categories = {
|
||||
plane = Unit.Category.AIRPLANE,
|
||||
helicopter = Unit.Category.HELICOPTER,
|
||||
ground = Unit.Category.GROUND_UNIT,
|
||||
ship = Unit.Category.SHIP,
|
||||
structure = Unit.Category.STRUCTURE,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
--- Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @return #SET_PLAYER
|
||||
-- @usage
|
||||
-- -- Define a new SET_PLAYER Object. This DBObject will contain a reference to all Clients.
|
||||
-- DBObject = SET_PLAYER:New()
|
||||
function SET_PLAYER:New()
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, SET_BASE:New( _DATABASE.PLAYERS ) )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Add CLIENT(s) to SET_PLAYER.
|
||||
-- @param Core.Set#SET_PLAYER self
|
||||
-- @param #string AddClientNames A single name or an array of CLIENT names.
|
||||
-- @return self
|
||||
function SET_PLAYER:AddClientsByName( AddClientNames )
|
||||
|
||||
local AddClientNamesArray = ( type( AddClientNames ) == "table" ) and AddClientNames or { AddClientNames }
|
||||
|
||||
for AddClientID, AddClientName in pairs( AddClientNamesArray ) do
|
||||
self:Add( AddClientName, CLIENT:FindByName( AddClientName ) )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Remove CLIENT(s) from SET_PLAYER.
|
||||
-- @param Core.Set#SET_PLAYER self
|
||||
-- @param Wrapper.Client#CLIENT RemoveClientNames A single name or an array of CLIENT names.
|
||||
-- @return self
|
||||
function SET_PLAYER:RemoveClientsByName( RemoveClientNames )
|
||||
|
||||
local RemoveClientNamesArray = ( type( RemoveClientNames ) == "table" ) and RemoveClientNames or { RemoveClientNames }
|
||||
|
||||
for RemoveClientID, RemoveClientName in pairs( RemoveClientNamesArray ) do
|
||||
self:Remove( RemoveClientName.ClientName )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Finds a Client based on the Player Name.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string PlayerName
|
||||
-- @return Wrapper.Client#CLIENT The found Client.
|
||||
function SET_PLAYER:FindClient( PlayerName )
|
||||
|
||||
local ClientFound = self.Set[PlayerName]
|
||||
return ClientFound
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Builds a set of clients of coalitions joined by specific players.
|
||||
-- Possible current coalitions are red, blue and neutral.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterCoalitions( Coalitions )
|
||||
if not self.Filter.Coalitions then
|
||||
self.Filter.Coalitions = {}
|
||||
end
|
||||
if type( Coalitions ) ~= "table" then
|
||||
Coalitions = { Coalitions }
|
||||
end
|
||||
for CoalitionID, Coalition in pairs( Coalitions ) do
|
||||
self.Filter.Coalitions[Coalition] = Coalition
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of clients out of categories joined by players.
|
||||
-- Possible current categories are plane, helicopter, ground, ship.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string Categories Can take the following values: "plane", "helicopter", "ground", "ship".
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterCategories( Categories )
|
||||
if not self.Filter.Categories then
|
||||
self.Filter.Categories = {}
|
||||
end
|
||||
if type( Categories ) ~= "table" then
|
||||
Categories = { Categories }
|
||||
end
|
||||
for CategoryID, Category in pairs( Categories ) do
|
||||
self.Filter.Categories[Category] = Category
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of clients of defined client types joined by players.
|
||||
-- Possible current types are those types known within DCS world.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string Types Can take those type strings known within DCS world.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterTypes( Types )
|
||||
if not self.Filter.Types then
|
||||
self.Filter.Types = {}
|
||||
end
|
||||
if type( Types ) ~= "table" then
|
||||
Types = { Types }
|
||||
end
|
||||
for TypeID, Type in pairs( Types ) do
|
||||
self.Filter.Types[Type] = Type
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of clients of defined countries.
|
||||
-- Possible current countries are those known within DCS world.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string Countries Can take those country strings known within DCS world.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterCountries( Countries )
|
||||
if not self.Filter.Countries then
|
||||
self.Filter.Countries = {}
|
||||
end
|
||||
if type( Countries ) ~= "table" then
|
||||
Countries = { Countries }
|
||||
end
|
||||
for CountryID, Country in pairs( Countries ) do
|
||||
self.Filter.Countries[Country] = Country
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of clients of defined client prefixes.
|
||||
-- All the clients starting with the given prefixes will be included within the set.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #string Prefixes The prefix of which the client name starts with.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterPrefixes( Prefixes )
|
||||
if not self.Filter.ClientPrefixes then
|
||||
self.Filter.ClientPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.ClientPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Starts the filtering.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:FilterStart()
|
||||
|
||||
if _DATABASE then
|
||||
self:_FilterStart()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Handles the Database to check on an event (birth) that the Object was added in the Database.
|
||||
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
-- @return #string The name of the CLIENT
|
||||
-- @return #table The CLIENT
|
||||
function SET_PLAYER:AddInDatabase( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Handles the Database to check on any event that Object exists in the Database.
|
||||
-- This is required, because sometimes the _DATABASE event gets called later than the SET_BASE event or vise versa!
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
-- @return #string The name of the CLIENT
|
||||
-- @return #table The CLIENT
|
||||
function SET_PLAYER:FindInDatabase( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Iterate the SET_PLAYER and call an interator function for each **alive** CLIENT, providing the CLIENT and optional parameters.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:ForEachPlayer( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Set )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_PLAYER and call an iterator function for each **alive** CLIENT presence completely in a @{Zone}, providing the CLIENT and optional parameters to the called function.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:ForEachPlayerInZone( ZoneObject, IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Set,
|
||||
--- @param Core.Zone#ZONE_BASE ZoneObject
|
||||
-- @param Wrapper.Client#CLIENT ClientObject
|
||||
function( ZoneObject, ClientObject )
|
||||
if ClientObject:IsInZone( ZoneObject ) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end, { ZoneObject } )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_PLAYER and call an iterator function for each **alive** CLIENT presence not in a @{Zone}, providing the CLIENT and optional parameters to the called function.
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:ForEachPlayerNotInZone( ZoneObject, IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Set,
|
||||
--- @param Core.Zone#ZONE_BASE ZoneObject
|
||||
-- @param Wrapper.Client#CLIENT ClientObject
|
||||
function( ZoneObject, ClientObject )
|
||||
if ClientObject:IsNotInZone( ZoneObject ) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end, { ZoneObject } )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #SET_PLAYER self
|
||||
-- @param Wrapper.Client#CLIENT MClient
|
||||
-- @return #SET_PLAYER self
|
||||
function SET_PLAYER:IsIncludeObject( MClient )
|
||||
self:F2( MClient )
|
||||
|
||||
local MClientInclude = true
|
||||
|
||||
if MClient then
|
||||
local MClientName = MClient.UnitName
|
||||
|
||||
if self.Filter.Coalitions then
|
||||
local MClientCoalition = false
|
||||
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
|
||||
local ClientCoalitionID = _DATABASE:GetCoalitionFromClientTemplate( MClientName )
|
||||
self:T3( { "Coalition:", ClientCoalitionID, self.FilterMeta.Coalitions[CoalitionName], CoalitionName } )
|
||||
if self.FilterMeta.Coalitions[CoalitionName] and self.FilterMeta.Coalitions[CoalitionName] == ClientCoalitionID then
|
||||
MClientCoalition = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Coalition", MClientCoalition } )
|
||||
MClientInclude = MClientInclude and MClientCoalition
|
||||
end
|
||||
|
||||
if self.Filter.Categories then
|
||||
local MClientCategory = false
|
||||
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
|
||||
local ClientCategoryID = _DATABASE:GetCategoryFromClientTemplate( MClientName )
|
||||
self:T3( { "Category:", ClientCategoryID, self.FilterMeta.Categories[CategoryName], CategoryName } )
|
||||
if self.FilterMeta.Categories[CategoryName] and self.FilterMeta.Categories[CategoryName] == ClientCategoryID then
|
||||
MClientCategory = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Category", MClientCategory } )
|
||||
MClientInclude = MClientInclude and MClientCategory
|
||||
end
|
||||
|
||||
if self.Filter.Types then
|
||||
local MClientType = false
|
||||
for TypeID, TypeName in pairs( self.Filter.Types ) do
|
||||
self:T3( { "Type:", MClient:GetTypeName(), TypeName } )
|
||||
if TypeName == MClient:GetTypeName() then
|
||||
MClientType = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Type", MClientType } )
|
||||
MClientInclude = MClientInclude and MClientType
|
||||
end
|
||||
|
||||
if self.Filter.Countries then
|
||||
local MClientCountry = false
|
||||
for CountryID, CountryName in pairs( self.Filter.Countries ) do
|
||||
local ClientCountryID = _DATABASE:GetCountryFromClientTemplate(MClientName)
|
||||
self:T3( { "Country:", ClientCountryID, country.id[CountryName], CountryName } )
|
||||
if country.id[CountryName] and country.id[CountryName] == ClientCountryID then
|
||||
MClientCountry = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Country", MClientCountry } )
|
||||
MClientInclude = MClientInclude and MClientCountry
|
||||
end
|
||||
|
||||
if self.Filter.ClientPrefixes then
|
||||
local MClientPrefix = false
|
||||
for ClientPrefixId, ClientPrefix in pairs( self.Filter.ClientPrefixes ) do
|
||||
self:T3( { "Prefix:", string.find( MClient.UnitName, ClientPrefix, 1 ), ClientPrefix } )
|
||||
if string.find( MClient.UnitName, ClientPrefix, 1 ) then
|
||||
MClientPrefix = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Prefix", MClientPrefix } )
|
||||
MClientInclude = MClientInclude and MClientPrefix
|
||||
end
|
||||
end
|
||||
|
||||
self:T2( MClientInclude )
|
||||
return MClientInclude
|
||||
end
|
||||
|
||||
--- @type SET_AIRBASE
|
||||
-- @extends Core.Set#SET_BASE
|
||||
|
||||
|
||||
184
Moose Development/Moose/Core/Velocity.lua
Normal file
184
Moose Development/Moose/Core/Velocity.lua
Normal file
@ -0,0 +1,184 @@
|
||||
--- **Core** -- VELOCITY models a speed, which can be expressed in various formats according the Settings.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- @module Base
|
||||
|
||||
do -- Velocity
|
||||
|
||||
--- @type VELOCITY
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # VELOCITY class, extends @{Base#BASE}
|
||||
--
|
||||
-- VELOCITY models a speed, which can be expressed in various formats according the Settings.
|
||||
--
|
||||
-- ## 1. VELOCITY constructor
|
||||
--
|
||||
-- * @{#VELOCITY.New}(): Creates a new VELOCITY object.
|
||||
--
|
||||
-- @field #VELOCITY
|
||||
VELOCITY = {
|
||||
ClassName = "VELOCITY",
|
||||
}
|
||||
|
||||
--- VELOCITY Constructor.
|
||||
-- @param #VELOCITY self
|
||||
-- @param #number VelocityMps The velocity in meters per second.
|
||||
-- @return #VELOCITY
|
||||
function VELOCITY:New( VelocityMps )
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #VELOCITY
|
||||
self:F( {} )
|
||||
self.Velocity = VelocityMps
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set the velocity in Mps (meters per second).
|
||||
-- @param #VELOCITY self
|
||||
-- @param #number VelocityMps The velocity in meters per second.
|
||||
-- @return #VELOCITY
|
||||
function VELOCITY:Set( VelocityMps )
|
||||
self.Velocity = VelocityMps
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the velocity in Mps (meters per second).
|
||||
-- @param #VELOCITY self
|
||||
-- @return #number The velocity in meters per second.
|
||||
function VELOCITY:Get()
|
||||
return self.Velocity
|
||||
end
|
||||
|
||||
--- Set the velocity in Kmph (kilometers per hour).
|
||||
-- @param #VELOCITY self
|
||||
-- @param #number VelocityKmph The velocity in kilometers per hour.
|
||||
-- @return #VELOCITY
|
||||
function VELOCITY:SetKmph( VelocityKmph )
|
||||
self.Velocity = UTILS.KmphToMps( VelocityKmph )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the velocity in Kmph (kilometers per hour).
|
||||
-- @param #VELOCITY self
|
||||
-- @return #number The velocity in kilometers per hour.
|
||||
function VELOCITY:GetKmph()
|
||||
|
||||
return UTILS.MpsToKmph( self.Velocity )
|
||||
end
|
||||
|
||||
--- Set the velocity in Miph (miles per hour).
|
||||
-- @param #VELOCITY self
|
||||
-- @param #number VelocityMiph The velocity in miles per hour.
|
||||
-- @return #VELOCITY
|
||||
function VELOCITY:SetMiph( VelocityMiph )
|
||||
self.Velocity = UTILS.MiphToMps( VelocityMiph )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the velocity in Miph (miles per hour).
|
||||
-- @param #VELOCITY self
|
||||
-- @return #number The velocity in miles per hour.
|
||||
function VELOCITY:GetMiph()
|
||||
return UTILS.MpsToMiph( self.Velocity )
|
||||
end
|
||||
|
||||
|
||||
--- Get the velocity in text, according the player @{Settings}.
|
||||
-- @param #VELOCITY self
|
||||
-- @param Core.Settings#SETTINGS Settings
|
||||
-- @return #string The velocity in text.
|
||||
function VELOCITY:GetText( Settings )
|
||||
local Settings = Settings or _SETTINGS
|
||||
if self.Velocity ~= 0 then
|
||||
if Settings:IsMetric() then
|
||||
return string.format( "%d km/h", UTILS.MpsToKmph( self.Velocity ) )
|
||||
else
|
||||
return string.format( "%d mi/h", UTILS.MpsToMiph( self.Velocity ) )
|
||||
end
|
||||
else
|
||||
return "stationary"
|
||||
end
|
||||
end
|
||||
|
||||
--- Get the velocity in text, according the player or default @{Settings}.
|
||||
-- @param #VELOCITY self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable
|
||||
-- @param Core.Settings#SETTINGS Settings
|
||||
-- @return #string The velocity in text according the player or default @{Settings}
|
||||
function VELOCITY:ToString( VelocityGroup, Settings ) -- R2.3
|
||||
self:F( { Group = VelocityGroup and VelocityGroup:GetName() } )
|
||||
local Settings = Settings or ( VelocityGroup and _DATABASE:GetPlayerSettings( VelocityGroup:GetPlayerName() ) ) or _SETTINGS
|
||||
return self:GetText( Settings )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- VELOCITY_POSITIONABLE
|
||||
|
||||
--- @type VELOCITY_POSITIONABLE
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # VELOCITY_POSITIONABLE class, extends @{Base#BASE}
|
||||
--
|
||||
-- VELOCITY_POSITIONABLE monitors the speed of an @{Positionable} in the simulation, which can be expressed in various formats according the Settings.
|
||||
--
|
||||
-- ## 1. VELOCITY_POSITIONABLE constructor
|
||||
--
|
||||
-- * @{#VELOCITY_POSITIONABLE.New}(): Creates a new VELOCITY_POSITIONABLE object.
|
||||
--
|
||||
-- @field #VELOCITY_POSITIONABLE
|
||||
VELOCITY_POSITIONABLE = {
|
||||
ClassName = "VELOCITY_POSITIONABLE",
|
||||
}
|
||||
|
||||
--- VELOCITY_POSITIONABLE Constructor.
|
||||
-- @param #VELOCITY_POSITIONABLE self
|
||||
-- @param Wrapper.Positionable#POSITIONABLE Positionable The Positionable to monitor the speed.
|
||||
-- @return #VELOCITY_POSITIONABLE
|
||||
function VELOCITY_POSITIONABLE:New( Positionable )
|
||||
local self = BASE:Inherit( self, VELOCITY:New() ) -- #VELOCITY_POSITIONABLE
|
||||
self:F( {} )
|
||||
self.Positionable = Positionable
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the velocity in Mps (meters per second).
|
||||
-- @param #VELOCITY_POSITIONABLE self
|
||||
-- @return #number The velocity in meters per second.
|
||||
function VELOCITY_POSITIONABLE:Get()
|
||||
return self.Positionable:GetVelocityMPS() or 0
|
||||
end
|
||||
|
||||
--- Get the velocity in Kmph (kilometers per hour).
|
||||
-- @param #VELOCITY_POSITIONABLE self
|
||||
-- @return #number The velocity in kilometers per hour.
|
||||
function VELOCITY_POSITIONABLE:GetKmph()
|
||||
|
||||
return UTILS.MpsToKmph( self.Positionable:GetVelocityMPS() or 0)
|
||||
end
|
||||
|
||||
--- Get the velocity in Miph (miles per hour).
|
||||
-- @param #VELOCITY_POSITIONABLE self
|
||||
-- @return #number The velocity in miles per hour.
|
||||
function VELOCITY_POSITIONABLE:GetMiph()
|
||||
return UTILS.MpsToMiph( self.Positionable:GetVelocityMPS() or 0 )
|
||||
end
|
||||
|
||||
--- Get the velocity in text, according the player or default @{Settings}.
|
||||
-- @param #VELOCITY_POSITIONABLE self
|
||||
-- @return #string The velocity in text according the player or default @{Settings}
|
||||
function VELOCITY_POSITIONABLE:ToString() -- R2.3
|
||||
self:F( { Group = self.Positionable and self.Positionable:GetName() } )
|
||||
local Settings = Settings or ( self.Positionable and _DATABASE:GetPlayerSettings( self.Positionable:GetPlayerName() ) ) or _SETTINGS
|
||||
self.Velocity = self.Positionable:GetVelocityMPS()
|
||||
return self:GetText( Settings )
|
||||
end
|
||||
|
||||
end
|
||||
@ -29,19 +29,19 @@ AIRBASEPOLICE_BASE = {
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_BASE object.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param SetClient A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.
|
||||
-- @param Airbases A table of Airbase Names.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:New( SetClient, Airbases, AirbaseList )
|
||||
function AIRBASEPOLICE_BASE:New( Airbases, AirbaseList )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:E( { self.ClassName, SetClient, Airbases } )
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #AIRBASEPOLICE_BASE
|
||||
self:E( { self.ClassName, Airbases } )
|
||||
|
||||
self.SetClient = SetClient
|
||||
self.Airbases = Airbases
|
||||
|
||||
self.AirbaseList = AirbaseList
|
||||
|
||||
self.SetClient = SET_CLIENT:New():FilterCategories( "plane" ):FilterStart()
|
||||
|
||||
|
||||
for AirbaseID, Airbase in pairs( self.Airbases ) do
|
||||
Airbase.ZoneBoundary = _DATABASE:FindAirbase( AirbaseID ):GetZone()
|
||||
@ -69,15 +69,19 @@ function AIRBASEPOLICE_BASE:New( SetClient, Airbases, AirbaseList )
|
||||
function( Client )
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0)
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
Client:SetState( self, "Taxi", false )
|
||||
end
|
||||
)
|
||||
|
||||
self.AirbaseMonitor = SCHEDULER:New( self, self._AirbaseMonitor, {}, 0, 2, 0.05 )
|
||||
self.AirbaseMonitor = SCHEDULER:New( self, self._AirbaseMonitor, {self }, 0, 2, 0.05 )
|
||||
|
||||
-- This is simple slot blocker is used on the server.
|
||||
SSB = USERFLAG:New( "SSB" )
|
||||
SSB:Set( 100 )
|
||||
|
||||
self:SetKickSpeedKmph( 100 )
|
||||
|
||||
return self
|
||||
end
|
||||
@ -97,14 +101,36 @@ function AIRBASEPOLICE_BASE:SmokeRunways( SmokeColor )
|
||||
end
|
||||
|
||||
|
||||
--- Set the maximum speed in Kmph until the player gets kicked.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param #number KickSpeed Set the maximum speed in Kmph until the player gets kicked.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:SetKickSpeedKmph( KickSpeed )
|
||||
|
||||
self.KickSpeed = UTILS.KmphToMps( KickSpeed )
|
||||
end
|
||||
|
||||
--- Set the maximum speed in Miph until the player gets kicked.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param #number KickSpeedMiph Set the maximum speed in Mph until the player gets kicked.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:SetKickSpeedMiph( KickSpeedMiph )
|
||||
|
||||
self.KickSpeed = UTILS.MiphToMps( KickSpeedMiph )
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- @param #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
|
||||
self:E( "In Scheduler")
|
||||
|
||||
for AirbaseID, AirbaseMeta in pairs( self.Airbases ) do
|
||||
|
||||
if AirbaseMeta.Monitor == true then
|
||||
|
||||
self:E( AirbaseID )
|
||||
self:E( AirbaseID, AirbaseMeta.MaximumSpeed )
|
||||
|
||||
self.SetClient:ForEachClientInZone( AirbaseMeta.ZoneBoundary,
|
||||
|
||||
@ -112,32 +138,40 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
function( Client )
|
||||
|
||||
self:E( Client.UnitName )
|
||||
if Client:IsAlive() then
|
||||
if Client and Client:IsAlive() then
|
||||
local NotInRunwayZone = true
|
||||
for ZoneRunwayID, ZoneRunway in pairs( AirbaseMeta.ZoneRunways ) do
|
||||
NotInRunwayZone = ( Client:IsNotInZone( ZoneRunway ) == true ) and NotInRunwayZone or false
|
||||
end
|
||||
|
||||
if NotInRunwayZone then
|
||||
local Taxi = self:GetState( self, "Taxi" )
|
||||
local Taxi = Client:GetState( self, "Taxi" )
|
||||
self:E( Taxi )
|
||||
if Taxi == false then
|
||||
Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed " km/h.", 20, "ATC" )
|
||||
self:SetState( self, "Taxi", true )
|
||||
Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed .. " km/h.", 20, "ATC" )
|
||||
Client:SetState( self, "Taxi", true )
|
||||
end
|
||||
|
||||
-- TODO: GetVelocityKMH function usage
|
||||
local VelocityVec3 = Client:GetVelocity()
|
||||
local Velocity = ( VelocityVec3.x ^ 2 + VelocityVec3.y ^ 2 + VelocityVec3.z ^ 2 ) ^ 0.5 -- in meters / sec
|
||||
local Velocity = Velocity * 3.6 -- now it is in km/h.
|
||||
-- MESSAGE:New( "Velocity = " .. Velocity, 1 ):ToAll()
|
||||
local Velocity = VELOCITY_POSITIONABLE:New( Client )
|
||||
--MESSAGE:New( "Velocity = " .. Velocity:ToString(), 1 ):ToAll()
|
||||
local IsAboveRunway = Client:IsAboveRunway()
|
||||
local IsOnGround = Client:InAir() == false
|
||||
self:T( IsAboveRunway, IsOnGround )
|
||||
|
||||
if IsAboveRunway and IsOnGround then
|
||||
if IsOnGround then
|
||||
if Velocity:Get() > self.KickSpeed then
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if Velocity > AirbaseMeta.MaximumSpeed then
|
||||
if IsOnGround then
|
||||
|
||||
if Velocity:GetKmph() > AirbaseMeta.MaximumSpeed then
|
||||
local IsSpeeding = Client:GetState( self, "Speeding" )
|
||||
|
||||
if IsSpeeding == true then
|
||||
@ -146,7 +180,7 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
|
||||
if SpeedingWarnings <= 3 then
|
||||
Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " ..
|
||||
string.format( "%2.0f km/h", Velocity ), 5, "ATC" )
|
||||
string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
@ -157,7 +191,7 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
end
|
||||
|
||||
else
|
||||
Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%2.0f km/h", Velocity ), 5, "ATC" )
|
||||
Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Speeding", true )
|
||||
Client:SetState( self, "Warnings", 1 )
|
||||
end
|
||||
@ -168,13 +202,45 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
end
|
||||
end
|
||||
|
||||
if IsOnGround and not IsAboveRunway then
|
||||
|
||||
local IsOffRunway = Client:GetState( self, "IsOffRunway" )
|
||||
|
||||
if IsOffRunway == true then
|
||||
local OffRunwayWarnings = Client:GetState( self, "OffRunwayWarnings" )
|
||||
self:T( OffRunwayWarnings )
|
||||
|
||||
if OffRunwayWarnings <= 3 then
|
||||
Client:Message( "Warning " .. OffRunwayWarnings .. "/3! Airbase traffic rule violation! Get back on the taxi immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "OffRunwayWarnings", OffRunwayWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
else
|
||||
Client:Message( "Attention! You are off the taxiway. Get back on the taxiway immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "IsOffRunway", true )
|
||||
Client:SetState( self, "OffRunwayWarnings", 1 )
|
||||
end
|
||||
|
||||
else
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
local Taxi = self:GetState( self, "Taxi" )
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
local Taxi = Client:GetState( self, "Taxi" )
|
||||
if Taxi == true then
|
||||
Client:Message( "You have progressed to the runway ... Await take-off clearance ...", 20, "ATC" )
|
||||
self:SetState( self, "Taxi", false )
|
||||
Client:SetState( self, "Taxi", false )
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -257,11 +323,8 @@ end
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_CAUCASUS object.
|
||||
--
|
||||
-- -- Create a set of all clients in the mission.
|
||||
-- AllClientsSet = SET_CLIENT:New():FilterStart()
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New( AllClientsSet )
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New()
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_CAUCASUS
|
||||
AIRBASEPOLICE_CAUCASUS = {
|
||||
@ -554,13 +617,12 @@ AIRBASEPOLICE_CAUCASUS = {
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_CAUCASUS object.
|
||||
-- @param #AIRBASEPOLICE_CAUCASUS self
|
||||
-- @param SetClient A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Caucasus enumerator).
|
||||
-- @return #AIRBASEPOLICE_CAUCASUS self
|
||||
function AIRBASEPOLICE_CAUCASUS:New( SetClient, AirbaseNames )
|
||||
function AIRBASEPOLICE_CAUCASUS:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( SetClient, self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
|
||||
|
||||
@ -828,16 +890,25 @@ end
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_NEVADA object.
|
||||
--
|
||||
-- -- Create a set of all clients in the mission.
|
||||
-- AllClientsSet = SET_CLIENT:New():FilterStart()
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceNevada = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New()
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_NEVADA
|
||||
AIRBASEPOLICE_NEVADA = {
|
||||
ClassName = "AIRBASEPOLICE_NEVADA",
|
||||
Airbases = {
|
||||
|
||||
[AIRBASE.Nevada.Beatty_Airport] = {
|
||||
PointsRunways = {
|
||||
[1] = {
|
||||
[1]={["y"]=-174950.05857143,["x"]=-329679.65,},
|
||||
[2]={["y"]=-174946.53828571,["x"]=-331394.03885715,},
|
||||
[3]={["y"]=-174967.10971429,["x"]=-331394.32457143,},
|
||||
[4]={["y"]=-174971.01828571,["x"]=-329682.59171429,},
|
||||
},
|
||||
},
|
||||
MaximumSpeed = 50,
|
||||
},
|
||||
[AIRBASE.Nevada.Boulder_City_Airport] = {
|
||||
PointsRunways = {
|
||||
[1] = {
|
||||
@ -951,6 +1022,17 @@ AIRBASEPOLICE_NEVADA = {
|
||||
},
|
||||
MaximumSpeed = 50,
|
||||
},
|
||||
[AIRBASE.Nevada.Lincoln_County] = {
|
||||
PointsRunways = {
|
||||
[1] = {
|
||||
[1]={["y"]=33222.34171429,["x"]=-223959.40171429,},
|
||||
[2]={["y"]=33200.040000004,["x"]=-225369.36828572,},
|
||||
[3]={["y"]=33177.634571428,["x"]=-225369.21485715,},
|
||||
[4]={["y"]=33201.198857147,["x"]=-223960.54457143,},
|
||||
},
|
||||
},
|
||||
MaximumSpeed = 50,
|
||||
},
|
||||
[AIRBASE.Nevada.McCarran_International_Airport] = {
|
||||
PointsRunways = {
|
||||
[1] = {
|
||||
@ -1085,13 +1167,12 @@ AIRBASEPOLICE_NEVADA = {
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_NEVADA object.
|
||||
-- @param #AIRBASEPOLICE_NEVADA self
|
||||
-- @param SetClient A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Nevada enumerator).
|
||||
-- @return #AIRBASEPOLICE_NEVADA self
|
||||
function AIRBASEPOLICE_NEVADA:New( SetClient, AirbaseNames )
|
||||
function AIRBASEPOLICE_NEVADA:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( SetClient, self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
|
||||
|
||||
@ -1107,6 +1188,13 @@ function AIRBASEPOLICE_NEVADA:New( SetClient, AirbaseNames )
|
||||
|
||||
--[[
|
||||
|
||||
-- Beatty
|
||||
do
|
||||
local VillagePrefix = "Beatty"
|
||||
local Runway1 = GROUP:FindByName( VillagePrefix .. " 1" )
|
||||
local Zone1 = ZONE_POLYGON:New( VillagePrefix .. " 1", Runway1 ):SmokeZone(SMOKECOLOR.Red):Flush()
|
||||
end
|
||||
|
||||
-- Boulder
|
||||
do
|
||||
local VillagePrefix = "Boulder"
|
||||
@ -1168,7 +1256,7 @@ function AIRBASEPOLICE_NEVADA:New( SetClient, AirbaseNames )
|
||||
|
||||
-- Lincoln
|
||||
do
|
||||
local VillagePrefix = "Laughlin"
|
||||
local VillagePrefix = "Lincoln"
|
||||
local Runway1 = GROUP:FindByName( VillagePrefix .. " 1" )
|
||||
local Zone1 = ZONE_POLYGON:New( VillagePrefix .. " 1", Runway1 ):SmokeZone(SMOKECOLOR.Red):Flush()
|
||||
end
|
||||
@ -1299,11 +1387,8 @@ end
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_NORMANDY object.
|
||||
--
|
||||
-- -- Create a set of all clients in the mission.
|
||||
-- AllClientsSet = SET_CLIENT:New():FilterStart()
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New( AllClientsSet )
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New()
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_NORMANDY
|
||||
AIRBASEPOLICE_NORMANDY = {
|
||||
@ -1701,13 +1786,12 @@ AIRBASEPOLICE_NORMANDY = {
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_NORMANDY object.
|
||||
-- @param #AIRBASEPOLICE_NORMANDY self
|
||||
-- @param SetClient A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Normandy enumerator).
|
||||
-- @return #AIRBASEPOLICE_NORMANDY self
|
||||
function AIRBASEPOLICE_NORMANDY:New( SetClient, AirbaseNames )
|
||||
function AIRBASEPOLICE_NORMANDY:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( SetClient, self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
-- These lines here are for the demonstration mission.
|
||||
-- They create in the dcs.log the coordinates of the runway polygons, that are then
|
||||
|
||||
@ -544,7 +544,7 @@ do -- TASK_A2G_BAI
|
||||
|
||||
local TargetCoordinate = self:GetInfo( "Coordinate" ) -- Core.Point#COORDINATE
|
||||
|
||||
local Velocity = self.TargetSetUnit:GetVelocity()
|
||||
local Velocity = self.TargetSetUnit:GetVelocityVec3()
|
||||
local Heading = self.TargetSetUnit:GetHeading()
|
||||
|
||||
TargetCoordinate:SetHeading( Heading )
|
||||
|
||||
@ -236,26 +236,36 @@ UTILS.FeetToMeters = function(feet)
|
||||
return feet*0.3048
|
||||
end
|
||||
|
||||
UTILS.MpsToKnots = function(mps)
|
||||
return mps*3600/1852
|
||||
end
|
||||
|
||||
UTILS.MpsToKmph = function(mps)
|
||||
return mps*3.6
|
||||
end
|
||||
|
||||
UTILS.KnotsToMps = function(knots)
|
||||
return knots*1852/3600
|
||||
end
|
||||
|
||||
UTILS.KnotsToKmph = function(knots)
|
||||
return knots* 1.852
|
||||
end
|
||||
|
||||
UTILS.KmphToMps = function(kmph)
|
||||
return kmph/3.6
|
||||
UTILS.KmphToMps = function( kmph )
|
||||
return kmph / 3.6
|
||||
end
|
||||
|
||||
UTILS.MpsToKmph = function( mps )
|
||||
return mps * 3.6
|
||||
end
|
||||
|
||||
UTILS.MiphToMps = function( miph )
|
||||
return miph * 0.44704
|
||||
end
|
||||
|
||||
UTILS.MpsToMiph = function( mps )
|
||||
return mps / 0.44704
|
||||
end
|
||||
|
||||
UTILS.MpsToKnots = function( mps )
|
||||
return mps * 3600 / 1852
|
||||
end
|
||||
|
||||
UTILS.KnotsToMps = function( knots )
|
||||
return knots * 1852 / 3600
|
||||
end
|
||||
|
||||
|
||||
|
||||
--[[acc:
|
||||
in DM: decimal point of minutes.
|
||||
In DMS: decimal point of seconds.
|
||||
|
||||
@ -326,16 +326,35 @@ function POSITIONABLE:InAir()
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Returns the POSITIONABLE velocity vector.
|
||||
|
||||
--- Returns the a @{Velocity} object from the positionable.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
-- @return Dcs.DCSTypes#Vec3 The velocity vector
|
||||
-- @return Core.Velocity#VELOCITY Velocity The Velocity object.
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
function POSITIONABLE:GetVelocity()
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local Velocity = VELOCITY:New( self )
|
||||
return Velocity
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the POSITIONABLE velocity Vec3 vector.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
-- @return Dcs.DCSTypes#Vec3 The velocity Vec3 vector
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
function POSITIONABLE:GetVelocityVec3()
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local PositionableVelocityVec3 = DCSPositionable:getVelocity()
|
||||
self:T3( PositionableVelocityVec3 )
|
||||
@ -377,7 +396,7 @@ function POSITIONABLE:GetVelocityKMH()
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local VelocityVec3 = self:GetVelocity()
|
||||
local VelocityVec3 = self:GetVelocityVec3()
|
||||
local Velocity = ( VelocityVec3.x ^ 2 + VelocityVec3.y ^ 2 + VelocityVec3.z ^ 2 ) ^ 0.5 -- in meters / sec
|
||||
local Velocity = Velocity * 3.6 -- now it is in km/h.
|
||||
self:T3( Velocity )
|
||||
@ -396,7 +415,7 @@ function POSITIONABLE:GetVelocityMPS()
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local VelocityVec3 = self:GetVelocity()
|
||||
local VelocityVec3 = self:GetVelocityVec3()
|
||||
local Velocity = ( VelocityVec3.x ^ 2 + VelocityVec3.y ^ 2 + VelocityVec3.z ^ 2 ) ^ 0.5 -- in meters / sec
|
||||
self:T3( Velocity )
|
||||
return Velocity
|
||||
|
||||
@ -761,10 +761,9 @@ function UNIT:IsInZone( Zone )
|
||||
if self:IsAlive() then
|
||||
local IsInZone = Zone:IsVec3InZone( self:GetVec3() )
|
||||
|
||||
self:T2( { IsInZone } )
|
||||
self:E( { Unit = self.UnitName, IsInZone = IsInZone } )
|
||||
return IsInZone
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ Core/Zone.lua
|
||||
Core/Database.lua
|
||||
Core/Set.lua
|
||||
Core/Point.lua
|
||||
Core/Velocity.lua
|
||||
Core/Message.lua
|
||||
Core/Fsm.lua
|
||||
Core/Radio.lua
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info('*** MOOSE DYNAMIC INCLUDE START *** ')
|
||||
env.info('Moose Generation Timestamp: 20171021_1203')
|
||||
env.info('Moose Generation Timestamp: 20171023_1007')
|
||||
local base=_G
|
||||
__Moose={}
|
||||
__Moose.Include=function(IncludeFile)
|
||||
@ -31,6 +31,7 @@ __Moose.Include('Core/Zone.lua')
|
||||
__Moose.Include('Core/Database.lua')
|
||||
__Moose.Include('Core/Set.lua')
|
||||
__Moose.Include('Core/Point.lua')
|
||||
__Moose.Include('Core/Velocity.lua')
|
||||
__Moose.Include('Core/Message.lua')
|
||||
__Moose.Include('Core/Fsm.lua')
|
||||
__Moose.Include('Core/Radio.lua')
|
||||
|
||||
@ -671,6 +671,7 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(AI_A2A).IdleCount" >
|
||||
<strong>AI_A2A.IdleCount</strong>
|
||||
</a>
|
||||
|
||||
@ -153,6 +153,16 @@
|
||||
<p><img src="..\Presentations\AIRBASEPOLICE\Dia1.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<p>The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AIRBASEPOLICE_NORMANDY">AIRBASEPOLICE_NORMANDY</a></td>
|
||||
<td class="summary">
|
||||
<h1>AIRBASEPOLICE_NORMANDY, extends <a href="##(AIRBASEPOLICE_BASE)">#AIRBASEPOLICE_BASE</a></h1>
|
||||
|
||||
<p><img src="..\Presentations\AIRBASEPOLICE\Dia1.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<p>The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -165,7 +175,31 @@
|
||||
<h2><a id="#(AIRBASEPOLICE_BASE)">Type <code>AIRBASEPOLICE_BASE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).New">AIRBASEPOLICE_BASE:New(SetClient, Airbases, AirbaseList)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).AirbaseList">AIRBASEPOLICE_BASE.AirbaseList</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).AirbaseMonitor">AIRBASEPOLICE_BASE.AirbaseMonitor</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).Airbases">AIRBASEPOLICE_BASE.Airbases</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).KickSpeed">AIRBASEPOLICE_BASE.KickSpeed</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).New">AIRBASEPOLICE_BASE:New(Airbases, AirbaseList)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AIRBASEPOLICE_BASE object.</p>
|
||||
</td>
|
||||
@ -174,6 +208,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).SetClient">AIRBASEPOLICE_BASE.SetClient</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).SetKickSpeedKmph">AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set the maximum speed in Kmph until the player gets kicked.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_BASE).SetKickSpeedMiph">AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set the maximum speed in Miph until the player gets kicked.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -193,7 +239,7 @@
|
||||
<h2><a id="#(AIRBASEPOLICE_CAUCASUS)">Type <code>AIRBASEPOLICE_CAUCASUS</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_CAUCASUS).New">AIRBASEPOLICE_CAUCASUS:New(SetClient, AirbaseNames)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_CAUCASUS).New">AIRBASEPOLICE_CAUCASUS:New(AirbaseNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AIRBASEPOLICE_CAUCASUS object.</p>
|
||||
</td>
|
||||
@ -203,9 +249,19 @@
|
||||
<h2><a id="#(AIRBASEPOLICE_NEVADA)">Type <code>AIRBASEPOLICE_NEVADA</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_NEVADA).New">AIRBASEPOLICE_NEVADA:New(SetClient, AirbaseNames)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_NEVADA).New">AIRBASEPOLICE_NEVADA:New(AirbaseNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AIRBASEPOLICE_NEVADA object.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(AIRBASEPOLICE_NORMANDY)">Type <code>AIRBASEPOLICE_NORMANDY</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AIRBASEPOLICE_NORMANDY).New">AIRBASEPOLICE_NORMANDY:New(AirbaseNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new AIRBASEPOLICE_NORMANDY object.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -306,11 +362,8 @@ AIRBASEPOLICE is communicating with this modified script to kick players!</p>
|
||||
|
||||
<pre><code>-- This creates a new AIRBASEPOLICE_CAUCASUS object.
|
||||
|
||||
-- Create a set of all clients in the mission.
|
||||
AllClientsSet = SET_CLIENT:New():FilterStart()
|
||||
|
||||
-- Monitor for these clients the airbases.
|
||||
AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New( AllClientsSet )
|
||||
AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New()
|
||||
</code></pre>
|
||||
|
||||
|
||||
@ -378,11 +431,77 @@ AIRBASEPOLICE is communicating with this modified script to kick players!</p>
|
||||
|
||||
<pre><code>-- This creates a new AIRBASEPOLICE_NEVADA object.
|
||||
|
||||
-- Create a set of all clients in the mission.
|
||||
AllClientsSet = SET_CLIENT:New():FilterStart()
|
||||
-- Monitor for these clients the airbases.
|
||||
AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New()
|
||||
</code></pre>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(AIRBASEPOLICE_NORMANDY)">#AIRBASEPOLICE_NORMANDY</a></em>
|
||||
<a id="AIRBASEPOLICE_NORMANDY" >
|
||||
<strong>AIRBASEPOLICE_NORMANDY</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AIRBASEPOLICE_NORMANDY, extends <a href="##(AIRBASEPOLICE_BASE)">#AIRBASEPOLICE_BASE</a></h1>
|
||||
|
||||
<p><img src="..\Presentations\AIRBASEPOLICE\Dia1.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<p>The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.</p>
|
||||
|
||||
|
||||
<p>The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.</p>
|
||||
|
||||
<p>The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving
|
||||
faster than the maximum allowed speed, the pilot will be kicked.</p>
|
||||
|
||||
<p>Different airbases have different maximum speeds, according safety regulations.</p>
|
||||
|
||||
<h1>Airbases monitored</h1>
|
||||
|
||||
<p>The following airbases are monitored at the Caucasus region:</p>
|
||||
|
||||
<ul>
|
||||
<li>Nellis</li>
|
||||
<li>McCarran</li>
|
||||
<li>Creech</li>
|
||||
<li>GroomLake</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>Installation</h1>
|
||||
|
||||
<h2>In Single Player Missions</h2>
|
||||
|
||||
<p>AIRBASEPOLICE is fully functional in single player.</p>
|
||||
|
||||
<h2>In Multi Player Missions</h2>
|
||||
|
||||
<p>AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player.
|
||||
To work around this problem, a much better solution has been made, using the slot blocker script designed
|
||||
by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight.
|
||||
AIRBASEPOLICE is communicating with this modified script to kick players!</p>
|
||||
|
||||
<p>Install the file <strong>SimpleSlotBlockGameGUI.lua</strong> on the server, following the installation instructions described by Ciribob.</p>
|
||||
|
||||
<p><a href="https://github.com/ciribob/DCS-SimpleSlotBlock">Simple Slot Blocker from Ciribob & FlightControl</a></p>
|
||||
|
||||
<h1>Script it!</h1>
|
||||
|
||||
<h2>1. AIRBASEPOLICE_NORMANDY Constructor</h2>
|
||||
|
||||
<p>Creates a new AIRBASEPOLICE_NORMANDY object that will monitor pilots taxiing behaviour.</p>
|
||||
|
||||
<pre><code>-- This creates a new AIRBASEPOLICE_NORMANDY object.
|
||||
|
||||
-- Monitor for these clients the airbases.
|
||||
AirbasePoliceNevada = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
|
||||
AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New()
|
||||
</code></pre>
|
||||
|
||||
|
||||
@ -412,8 +531,64 @@ AirbasePoliceNevada = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AIRBASEPOLICE_BASE).AirbaseList" >
|
||||
<strong>AIRBASEPOLICE_BASE.AirbaseList</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AIRBASEPOLICE_BASE).AirbaseMonitor" >
|
||||
<strong>AIRBASEPOLICE_BASE.AirbaseMonitor</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AIRBASEPOLICE_BASE).Airbases" >
|
||||
<strong>AIRBASEPOLICE_BASE.Airbases</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AIRBASEPOLICE_BASE).KickSpeed" >
|
||||
<strong>AIRBASEPOLICE_BASE.KickSpeed</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_BASE).New" >
|
||||
<strong>AIRBASEPOLICE_BASE:New(SetClient, Airbases, AirbaseList)</strong>
|
||||
<strong>AIRBASEPOLICE_BASE:New(Airbases, AirbaseList)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -424,12 +599,6 @@ AirbasePoliceNevada = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SetClient </em></code>:
|
||||
A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Airbases </em></code>:
|
||||
A table of Airbase Names.</p>
|
||||
|
||||
@ -459,6 +628,60 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_BASE).SetKickSpeedKmph" >
|
||||
<strong>AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set the maximum speed in Kmph until the player gets kicked.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number KickSpeed </em></code>:
|
||||
Set the maximum speed in Kmph until the player gets kicked.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AIRBASEPOLICE_BASE)">#AIRBASEPOLICE_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_BASE).SetKickSpeedMiph" >
|
||||
<strong>AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set the maximum speed in Miph until the player gets kicked.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number KickSpeedMiph </em></code>:
|
||||
Set the maximum speed in Mph until the player gets kicked.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AIRBASEPOLICE_BASE)">#AIRBASEPOLICE_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -510,23 +733,17 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_CAUCASUS).New" >
|
||||
<strong>AIRBASEPOLICE_CAUCASUS:New(SetClient, AirbaseNames)</strong>
|
||||
<strong>AIRBASEPOLICE_CAUCASUS:New(AirbaseNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new AIRBASEPOLICE_CAUCASUS object.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SetClient </em></code>:
|
||||
A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AirbaseNames </em></code>:
|
||||
A list {} of airbase names (Use AIRBASE.Caucasus enumerator).</p>
|
||||
|
||||
@ -546,23 +763,17 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_NEVADA).New" >
|
||||
<strong>AIRBASEPOLICE_NEVADA:New(SetClient, AirbaseNames)</strong>
|
||||
<strong>AIRBASEPOLICE_NEVADA:New(AirbaseNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new AIRBASEPOLICE_NEVADA object.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SetClient </em></code>:
|
||||
A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AirbaseNames </em></code>:
|
||||
A list {} of airbase names (Use AIRBASE.Nevada enumerator).</p>
|
||||
|
||||
@ -573,6 +784,36 @@ A list {} of airbase names (Use AIRBASE.Nevada enumerator).</p>
|
||||
<p><em><a href="##(AIRBASEPOLICE_NEVADA)">#AIRBASEPOLICE_NEVADA</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(AIRBASEPOLICE_NORMANDY)" >Type <code>AIRBASEPOLICE_NORMANDY</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AIRBASEPOLICE_NORMANDY).New" >
|
||||
<strong>AIRBASEPOLICE_NORMANDY:New(AirbaseNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new AIRBASEPOLICE_NORMANDY object.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> AirbaseNames </em></code>:
|
||||
A list {} of airbase names (Use AIRBASE.Normandy enumerator).</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AIRBASEPOLICE_NORMANDY)">#AIRBASEPOLICE_NORMANDY</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2269,7 +2269,6 @@ The amount of seconds to delay the action.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CARGO_CRATE).CargoCarrier" >
|
||||
<strong>CARGO_CRATE.CargoCarrier</strong>
|
||||
</a>
|
||||
@ -3698,7 +3697,6 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CARGO_UNIT).CargoCarrier" >
|
||||
<strong>CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
@ -3806,6 +3804,7 @@ The range till cargo will board.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(CARGO_UNIT).RunCount" >
|
||||
<strong>CARGO_UNIT.RunCount</strong>
|
||||
</a>
|
||||
|
||||
@ -121,7 +121,19 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>1) <a href="##(DATABASE)">#DATABASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
<h3>Author: <strong>Sven Van de Velde (FlightControl)</strong></h3>
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#DATABASE">DATABASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>DATABASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the DATABASE class to refer to:</p>
|
||||
|
||||
<ul>
|
||||
@ -136,38 +148,6 @@
|
||||
</ul>
|
||||
|
||||
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
|
||||
|
||||
<p>Moose will automatically create one instance of the DATABASE class into the <strong>global</strong> object _DATABASE.
|
||||
Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.</p>
|
||||
|
||||
<h2>1.1) DATABASE iterators</h2>
|
||||
<p>You can iterate the database with the available iterator methods.
|
||||
The iterator methods will walk the DATABASE set, and call for each element within the set a function that you provide.
|
||||
The following iterator methods are currently available within the DATABASE:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(DATABASE).ForEachUnit">DATABASE.ForEachUnit</a>: Calls a function for each <a href="UNIT.html">UNIT</a> it finds within the DATABASE.</li>
|
||||
<li><a href="##(DATABASE).ForEachGroup">DATABASE.ForEachGroup</a>: Calls a function for each <a href="GROUP.html">GROUP</a> it finds within the DATABASE.</li>
|
||||
<li><a href="##(DATABASE).ForEachPlayer">DATABASE.ForEachPlayer</a>: Calls a function for each alive player it finds within the DATABASE.</li>
|
||||
<li><a href="##(DATABASE).ForEachPlayerJoined">DATABASE.ForEachPlayerJoined</a>: Calls a function for each joined player it finds within the DATABASE.</li>
|
||||
<li><a href="##(DATABASE).ForEachClient">DATABASE.ForEachClient</a>: Calls a function for each <a href="CLIENT.html">CLIENT</a> it finds within the DATABASE.</li>
|
||||
<li><a href="##(DATABASE).ForEachClientAlive">DATABASE.ForEachClientAlive</a>: Calls a function for each alive <a href="CLIENT.html">CLIENT</a> it finds within the DATABASE.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<h3>Author: <strong>Sven Van de Velde (FlightControl)</strong></h3>
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#DATABASE">DATABASE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -180,12 +160,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<h2><a id="#(DATABASE)">Type <code>DATABASE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AIRBASES">DATABASE.AIRBASES</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AccountDestroys">DATABASE:AccountDestroys(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Account the destroys.</p>
|
||||
@ -237,42 +211,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddUnit">DATABASE:AddUnit(DCSUnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).CARGOS">DATABASE.CARGOS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).CLIENTS">DATABASE.CLIENTS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).COUNTRY_ID">DATABASE.COUNTRY_ID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).COUNTRY_NAME">DATABASE.COUNTRY_NAME</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ClassName">DATABASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DESTROYS">DATABASE.DESTROYS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -393,12 +331,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachUnit">DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the DATABASE and call an iterator function for each <strong>alive</strong> UNIT, providing the UNIT and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GROUPS">DATABASE.GROUPS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -465,18 +397,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetStatusGroup">DATABASE:GetStatusGroup(GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Get a status to a Group within the Database, this to check crossing events for example.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).HITS">DATABASE.HITS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).NavPoints">DATABASE.NavPoints</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -501,36 +421,6 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).OnEventNewCargo">DATABASE:OnEventNewCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnEventNewCargo event.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERS">DATABASE.PLAYERS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERSETTINGS">DATABASE.PLAYERSETTINGS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERSJOINED">DATABASE.PLAYERSJOINED</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).PLAYERUNITS">DATABASE.PLAYERUNITS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).STATICS">DATABASE.STATICS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -549,36 +439,18 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Spawn">DATABASE:Spawn(SpawnTemplate)</a></td>
|
||||
<td class="summary">
|
||||
<p>Instantiate new Groups within the DCSRTE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Templates">DATABASE.Templates</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UNITS">DATABASE.UNITS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UNITS_Index">DATABASE.UNITS_Index</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).UNITS_Position">DATABASE.UNITS_Position</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ZONENAMES">DATABASE.ZONENAMES</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -618,7 +490,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterGroupTemplate">DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterGroupTemplate">DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
|
||||
</td>
|
||||
@ -666,6 +538,27 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>DATABASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the DATABASE class to refer to:</p>
|
||||
|
||||
<ul>
|
||||
<li>STATICS</li>
|
||||
<li>UNITS</li>
|
||||
<li>GROUPS</li>
|
||||
<li>CLIENTS</li>
|
||||
<li>AIRBASES</li>
|
||||
<li>PLAYERSJOINED</li>
|
||||
<li>PLAYERS</li>
|
||||
<li>CARGOS</li>
|
||||
</ul>
|
||||
|
||||
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
|
||||
|
||||
|
||||
|
||||
<p>The singleton object <strong>_DATABASE</strong> is automatically created by MOOSE, that administers all objects within the mission.
|
||||
Moose refers to <strong>_DATABASE</strong> within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -687,24 +580,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<h2><a id="#(Database)" >Type <code>Database</code></a></h2>
|
||||
|
||||
<h2><a id="#(DATABASE)" >Type <code>DATABASE</code></a></h2>
|
||||
|
||||
<p>DATABASE class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).AIRBASES" >
|
||||
<strong>DATABASE.AIRBASES</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@ -904,90 +780,6 @@ The name of the airbase</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).CARGOS" >
|
||||
<strong>DATABASE.CARGOS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).CLIENTS" >
|
||||
<strong>DATABASE.CLIENTS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).COUNTRY_ID" >
|
||||
<strong>DATABASE.COUNTRY_ID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).COUNTRY_NAME" >
|
||||
<strong>DATABASE.COUNTRY_NAME</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(DATABASE).ClassName" >
|
||||
<strong>DATABASE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).DESTROYS" >
|
||||
<strong>DATABASE.DESTROYS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1584,20 +1376,6 @@ The function that will be called for each object in the database. The function n
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).GROUPS" >
|
||||
<strong>DATABASE.GROUPS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1834,34 +1612,6 @@ self</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).HITS" >
|
||||
<strong>DATABASE.HITS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).NavPoints" >
|
||||
<strong>DATABASE.NavPoints</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1940,76 +1690,6 @@ DBObject = DATABASE:New()</code></pre>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).PLAYERS" >
|
||||
<strong>DATABASE.PLAYERS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).PLAYERSETTINGS" >
|
||||
<strong>DATABASE.PLAYERSETTINGS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).PLAYERSJOINED" >
|
||||
<strong>DATABASE.PLAYERSJOINED</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).PLAYERUNITS" >
|
||||
<strong>DATABASE.PLAYERUNITS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).STATICS" >
|
||||
<strong>DATABASE.STATICS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2098,20 +1778,6 @@ This method is used by the SPAWN class.</p>
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).Templates" >
|
||||
<strong>DATABASE.Templates</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2126,20 +1792,6 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).UNITS_Index" >
|
||||
<strong>DATABASE.UNITS_Index</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2154,20 +1806,6 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).ZONENAMES" >
|
||||
<strong>DATABASE.ZONENAMES</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2289,7 +1927,7 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterGroupTemplate" >
|
||||
<strong>DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</strong>
|
||||
<strong>DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2305,17 +1943,25 @@ self</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CoalitionID </em></code>: </p>
|
||||
<p><code><em><a href="Dcs.DCScoalition.html##(coalition.side)">Dcs.DCScoalition#coalition.side</a> CoalitionSide </em></code>:
|
||||
The coalition.side of the object.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CategoryID </em></code>: </p>
|
||||
<p><code><em><a href="Dcs.DCSObject.html##(Object.Category)">Dcs.DCSObject#Object.Category</a> CategoryID </em></code>:
|
||||
The Object.category of the object.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CountryID </em></code>: </p>
|
||||
<p><code><em><a href="Dcs.DCScountry.html##(country.id)">Dcs.DCScountry#country.id</a> CountryID </em></code>:
|
||||
the country.id of the object</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> GroupName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -1106,7 +1106,7 @@ function below will use the range 1-7 just in case</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(DESIGNATE).LaseDuration" >
|
||||
<strong>DESIGNATE.LaseDuration</strong>
|
||||
</a>
|
||||
|
||||
@ -460,6 +460,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).IsShip">GROUP:IsShip()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if the DCS Group contains Ships.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).NewTemplate">GROUP:NewTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new GROUP from a given GroupTemplate as a parameter.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -471,7 +477,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).Register">GROUP:Register(GroupName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new GROUP from a DCSGroup</p>
|
||||
<p>Create a new GROUP from an existing Group in the Mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1801,6 +1807,55 @@ true if DCS Group contains Ships.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).NewTemplate" >
|
||||
<strong>GROUP:NewTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a new GROUP from a given GroupTemplate as a parameter.</p>
|
||||
|
||||
|
||||
<p>Note that the GroupTemplate is NOT spawned into the mission.
|
||||
It is merely added to the <a href="Database.html">Database</a>.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table GroupTemplate </em></code>:
|
||||
The GroupTemplate Structure exactly as defined within the mission editor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCScoalition.html##(coalition.side)">Dcs.DCScoalition#coalition.side</a> CoalitionSide </em></code>:
|
||||
The coalition.side of the group.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSGroup.html##(Group.Category)">Dcs.DCSGroup#Group.Category</a> CategoryID </em></code>:
|
||||
The Group.Category of the group.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCScountry.html##(country.id)">Dcs.DCScountry#country.id</a> CountryID </em></code>:
|
||||
the country.id of the group.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).OnReSpawn" >
|
||||
<strong>GROUP:OnReSpawn(ReSpawnFunction)</strong>
|
||||
</a>
|
||||
@ -1828,14 +1883,14 @@ true if DCS Group contains Ships.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a new GROUP from a DCSGroup</p>
|
||||
<p>Create a new GROUP from an existing Group in the Mission.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSWrapper.Group.html##(Group)">Dcs.DCSWrapper.Group#Group</a> GroupName </em></code>:
|
||||
The DCS Group name</p>
|
||||
<p><code><em>#string GroupName </em></code>:
|
||||
The Group name</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -3495,6 +3495,7 @@ The y coordinate.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetVelocity">POSITIONABLE:GetVelocity()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the POSITIONABLE velocity vector.</p>
|
||||
<p>Returns the a <a href="Velocity.html">Velocity</a> object from the positionable.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -327,6 +327,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetVelocityMPS">POSITIONABLE:GetVelocityMPS()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the POSITIONABLE velocity in meters per second.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetVelocityVec3">POSITIONABLE:GetVelocityVec3()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the POSITIONABLE velocity Vec3 vector.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1208,14 +1214,14 @@ The POSITIONABLE is not existing or alive. </p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the POSITIONABLE velocity vector.</p>
|
||||
<p>Returns the a <a href="Velocity.html">Velocity</a> object from the positionable.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec3)">Dcs.DCSTypes#Vec3</a>:</em>
|
||||
The velocity vector</p>
|
||||
<p><em><a href="Core.Velocity.html##(VELOCITY)">Core.Velocity#VELOCITY</a>:</em>
|
||||
Velocity The Velocity object.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1266,6 +1272,34 @@ The velocity in meters per second.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetVelocityVec3" >
|
||||
<strong>POSITIONABLE:GetVelocityVec3()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the POSITIONABLE velocity Vec3 vector.</p>
|
||||
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec3)">Dcs.DCSTypes#Vec3</a>:</em>
|
||||
The velocity Vec3 vector</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#nil:</em>
|
||||
The POSITIONABLE is not existing or alive. </p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).HasCargo" >
|
||||
<strong>POSITIONABLE:HasCargo(Cargo)</strong>
|
||||
</a>
|
||||
|
||||
@ -236,6 +236,22 @@
|
||||
<li>Countries</li>
|
||||
<li>Starting with certain prefix strings.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SET_PLAYER">SET_PLAYER</a></td>
|
||||
<td class="summary">
|
||||
<h1>4) SET_PLAYER class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_PLAYER)">Set#SET_PLAYER</a> class to build sets of units belonging to alive players:</p>
|
||||
|
||||
<h2>4.1) SET_PLAYER constructor</h2>
|
||||
|
||||
<p>Create a new SET_PLAYER object with the <a href="##(SET_PLAYER).New">SET_PLAYER.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).New">SET_PLAYER.New</a>: Creates a new SET_PLAYER object.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -951,6 +967,106 @@ mission designer to add a dedicated method</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_GROUP)._EventOnDeadOrCrash">SET_GROUP:_EventOnDeadOrCrash(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnDead or OnCrash event for alive groups set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(SET_PLAYER)">Type <code>SET_PLAYER</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).AddClientsByName">SET_PLAYER:AddClientsByName(AddClientNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add CLIENT(s) to SET_PLAYER.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).AddInDatabase">SET_PLAYER:AddInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterCategories">SET_PLAYER:FilterCategories(Categories)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of clients out of categories joined by players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterCoalitions">SET_PLAYER:FilterCoalitions(Coalitions)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of clients of coalitions joined by specific players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterCountries">SET_PLAYER:FilterCountries(Countries)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of clients of defined countries.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterPrefixes">SET_PLAYER:FilterPrefixes(Prefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of clients of defined client prefixes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterStart">SET_PLAYER:FilterStart()</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FilterTypes">SET_PLAYER:FilterTypes(Types)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of clients of defined client types joined by players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FindClient">SET_PLAYER:FindClient(PlayerName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a Client based on the Player Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).FindInDatabase">SET_PLAYER:FindInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).ForEachPlayer">SET_PLAYER:ForEachPlayer(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_PLAYER and call an interator function for each <strong>alive</strong> CLIENT, providing the CLIENT and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).ForEachPlayerInZone">SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_PLAYER and call an iterator function for each <strong>alive</strong> CLIENT presence completely in a <a href="Zone.html">Zone</a>, providing the CLIENT and optional parameters to the called function.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).ForEachPlayerNotInZone">SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_PLAYER and call an iterator function for each <strong>alive</strong> CLIENT presence not in a <a href="Zone.html">Zone</a>, providing the CLIENT and optional parameters to the called function.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).IsIncludeObject">SET_PLAYER:IsIncludeObject(MClient)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).New">SET_PLAYER:New()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_PLAYER).RemoveClientsByName">SET_PLAYER:RemoveClientsByName(RemoveClientNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Remove CLIENT(s) from SET_PLAYER.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1664,6 +1780,69 @@ The following iterator methods are currently available within the SET</em>GROUP:
|
||||
|
||||
<hr/>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SET_PLAYER)">#SET_PLAYER</a></em>
|
||||
<a id="SET_PLAYER" >
|
||||
<strong>SET_PLAYER</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>4) SET_PLAYER class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_PLAYER)">Set#SET_PLAYER</a> class to build sets of units belonging to alive players:</p>
|
||||
|
||||
<h2>4.1) SET_PLAYER constructor</h2>
|
||||
|
||||
<p>Create a new SET_PLAYER object with the <a href="##(SET_PLAYER).New">SET_PLAYER.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).New">SET_PLAYER.New</a>: Creates a new SET_PLAYER object.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p> </p>
|
||||
<h2>4.3) SET_PLAYER filter criteria</h2>
|
||||
|
||||
<p>You can set filter criteria to define the set of clients within the SET_PLAYER.
|
||||
Filter criteria are defined by:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).FilterCoalitions">SET_PLAYER.FilterCoalitions</a>: Builds the SET_PLAYER with the clients belonging to the coalition(s).</li>
|
||||
<li><a href="##(SET_PLAYER).FilterCategories">SET_PLAYER.FilterCategories</a>: Builds the SET_PLAYER with the clients belonging to the category(ies).</li>
|
||||
<li><a href="##(SET_PLAYER).FilterTypes">SET_PLAYER.FilterTypes</a>: Builds the SET_PLAYER with the clients belonging to the client type(s).</li>
|
||||
<li><a href="##(SET_PLAYER).FilterCountries">SET_PLAYER.FilterCountries</a>: Builds the SET_PLAYER with the clients belonging to the country(ies).</li>
|
||||
<li><a href="##(SET_PLAYER).FilterPrefixes">SET_PLAYER.FilterPrefixes</a>: Builds the SET_PLAYER with the clients starting with the same prefix string(s).</li>
|
||||
</ul>
|
||||
|
||||
<p>Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).FilterStart">SET_PLAYER.FilterStart</a>: Starts the filtering of the clients within the SET_PLAYER.</li>
|
||||
</ul>
|
||||
|
||||
<p>Planned filter criteria within development are (so these are not yet available):</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).FilterZones">SET_PLAYER.FilterZones</a>: Builds the SET_PLAYER with the clients within a <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h2>4.4) SET_PLAYER iterators</h2>
|
||||
|
||||
<p>Once the filters have been defined and the SET<em>PLAYER has been built, you can iterate the SET</em>PLAYER with the available iterator methods.
|
||||
The iterator methods will walk the SET<em>PLAYER set, and call for each element within the set a function that you provide.
|
||||
The following iterator methods are currently available within the SET</em>PLAYER:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_PLAYER).ForEachClient">SET_PLAYER.ForEachClient</a>: Calls a function for each alive client it finds within the SET_PLAYER.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -4828,6 +5007,491 @@ A single name or an array of GROUP names.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(SET_PLAYER)" >Type <code>SET_PLAYER</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).AddClientsByName" >
|
||||
<strong>SET_PLAYER:AddClientsByName(AddClientNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add CLIENT(s) to SET_PLAYER.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string AddClientNames </em></code>:
|
||||
A single name or an array of CLIENT names.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).AddInDatabase" >
|
||||
<strong>SET_PLAYER:AddInDatabase(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE birth event gets called later than the SET</em>BASE birth event!</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the CLIENT</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#table:</em>
|
||||
The CLIENT</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterCategories" >
|
||||
<strong>SET_PLAYER:FilterCategories(Categories)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of clients out of categories joined by players.</p>
|
||||
|
||||
|
||||
<p>Possible current categories are plane, helicopter, ground, ship.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Categories </em></code>:
|
||||
Can take the following values: "plane", "helicopter", "ground", "ship".</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterCoalitions" >
|
||||
<strong>SET_PLAYER:FilterCoalitions(Coalitions)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of clients of coalitions joined by specific players.</p>
|
||||
|
||||
|
||||
<p>Possible current coalitions are red, blue and neutral.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Coalitions </em></code>:
|
||||
Can take the following values: "red", "blue", "neutral".</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterCountries" >
|
||||
<strong>SET_PLAYER:FilterCountries(Countries)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of clients of defined countries.</p>
|
||||
|
||||
|
||||
<p>Possible current countries are those known within DCS world.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Countries </em></code>:
|
||||
Can take those country strings known within DCS world.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterPrefixes" >
|
||||
<strong>SET_PLAYER:FilterPrefixes(Prefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of clients of defined client prefixes.</p>
|
||||
|
||||
|
||||
<p>All the clients starting with the given prefixes will be included within the set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Prefixes </em></code>:
|
||||
The prefix of which the client name starts with.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterStart" >
|
||||
<strong>SET_PLAYER:FilterStart()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FilterTypes" >
|
||||
<strong>SET_PLAYER:FilterTypes(Types)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of clients of defined client types joined by players.</p>
|
||||
|
||||
|
||||
<p>Possible current types are those types known within DCS world.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Types </em></code>:
|
||||
Can take those type strings known within DCS world.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FindClient" >
|
||||
<strong>SET_PLAYER:FindClient(PlayerName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a Client based on the Player Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a>:</em>
|
||||
The found Client.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).FindInDatabase" >
|
||||
<strong>SET_PLAYER:FindInDatabase(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE event gets called later than the SET</em>BASE event or vise versa!</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the CLIENT</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#table:</em>
|
||||
The CLIENT</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).ForEachPlayer" >
|
||||
<strong>SET_PLAYER:ForEachPlayer(IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_PLAYER and call an interator function for each <strong>alive</strong> CLIENT, providing the CLIENT and optional parameters.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).ForEachPlayerInZone" >
|
||||
<strong>SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_PLAYER and call an iterator function for each <strong>alive</strong> CLIENT presence completely in a <a href="Zone.html">Zone</a>, providing the CLIENT and optional parameters to the called function.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).ForEachPlayerNotInZone" >
|
||||
<strong>SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_PLAYER and call an iterator function for each <strong>alive</strong> CLIENT presence not in a <a href="Zone.html">Zone</a>, providing the CLIENT and optional parameters to the called function.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> ZoneObject </em></code>:
|
||||
The Zone to be tested for.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).IsIncludeObject" >
|
||||
<strong>SET_PLAYER:IsIncludeObject(MClient)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a> MClient </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).New" >
|
||||
<strong>SET_PLAYER:New()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_PLAYER)">#SET_PLAYER</a>:</em></p>
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Define a new SET_PLAYER Object. This DBObject will contain a reference to all Clients.
|
||||
DBObject = SET_PLAYER:New()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_PLAYER).RemoveClientsByName" >
|
||||
<strong>SET_PLAYER:RemoveClientsByName(RemoveClientNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Remove CLIENT(s) from SET_PLAYER.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a> RemoveClientNames </em></code>:
|
||||
A single name or an array of CLIENT names.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -1250,7 +1250,7 @@ true if metric.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SETTINGS).Metric" >
|
||||
<strong>SETTINGS.Metric</strong>
|
||||
</a>
|
||||
|
||||
@ -848,6 +848,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2308,9 +2314,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">
|
||||
@ -2885,9 +2888,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -3889,6 +3889,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -490,6 +490,7 @@ ptional) The name of the new static.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
|
||||
@ -562,7 +562,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em><a href="Core.Cargo.html##(CARGO)">Core.Cargo#CARGO</a></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
@ -576,6 +576,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).DeployZone" >
|
||||
<strong>FSM_PROCESS.DeployZone</strong>
|
||||
</a>
|
||||
@ -640,7 +641,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(TASK_CARGO).CargoLimit" >
|
||||
<strong>TASK_CARGO.CargoLimit</strong>
|
||||
</a>
|
||||
|
||||
@ -317,6 +317,12 @@ which are excellent tools to be reused in an OO environment!.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UTILS).MetersToNM">UTILS.MetersToNM(meters)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UTILS).MiphToMps">UTILS.MiphToMps(miph)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -329,6 +335,12 @@ which are excellent tools to be reused in an OO environment!.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UTILS).MpsToKnots">UTILS.MpsToKnots(mps)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UTILS).MpsToMiph">UTILS.MpsToMiph(mps)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -910,6 +922,27 @@ is the name of the class to evaluate (can be either a string or a Moose class)</
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UTILS).MiphToMps" >
|
||||
<strong>UTILS.MiphToMps(miph)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> miph </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UTILS).MpsToKmph" >
|
||||
<strong>UTILS.MpsToKmph(mps)</strong>
|
||||
</a>
|
||||
@ -939,6 +972,27 @@ is the name of the class to evaluate (can be either a string or a Moose class)</
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> mps </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UTILS).MpsToMiph" >
|
||||
<strong>UTILS.MpsToMiph(mps)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@ -528,7 +528,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).FlareZone">ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).FlareZone">ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth, AddHeight)</a></td>
|
||||
<td class="summary">
|
||||
<p>Flares the zone boundaries in a color.</p>
|
||||
</td>
|
||||
@ -678,7 +678,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).SmokeZone">ZONE_RADIUS:SmokeZone(SmokeColor, Points)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_RADIUS).SmokeZone">ZONE_RADIUS:SmokeZone(SmokeColor, Points, AddHeight, AddOffSet, AngleOffset)</a></td>
|
||||
<td class="summary">
|
||||
<p>Smokes the zone boundaries in a color.</p>
|
||||
</td>
|
||||
@ -2063,7 +2063,7 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_RADIUS).FlareZone" >
|
||||
<strong>ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth)</strong>
|
||||
<strong>ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth, AddHeight)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2089,6 +2089,12 @@ The flare color.</p>
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Azimuth)">Dcs.DCSTypes#Azimuth</a> Azimuth </em></code>:
|
||||
(optional) Azimuth The azimuth of the flare.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number AddHeight </em></code>:
|
||||
(optional) The height to be added for the smoke.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
@ -2712,7 +2718,7 @@ The new location of the zone.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_RADIUS).SmokeZone" >
|
||||
<strong>ZONE_RADIUS:SmokeZone(SmokeColor, Points)</strong>
|
||||
<strong>ZONE_RADIUS:SmokeZone(SmokeColor, Points, AddHeight, AddOffSet, AngleOffset)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2732,6 +2738,23 @@ The smoke color.</p>
|
||||
<p><code><em>#number Points </em></code>:
|
||||
(optional) The amount of points in the circle.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number AddHeight </em></code>:
|
||||
(optional) The height to be added for the smoke.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number AddOffSet </em></code>:
|
||||
(optional) The angle to be added for the smoking start position.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> AngleOffset </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
@ -288,7 +288,7 @@ even when there are hardly any players in the mission.</strong></p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Base.html">Base</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Core</strong> -- BASE forms <strong>the basis of the MOOSE framework</strong>.</p>
|
||||
<p><strong>Core</strong> -- VELOCITY models a speed, which can be expressed in various formats according the Settings.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user