mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Documentation
This commit is contained in:
@@ -1,9 +1,35 @@
|
||||
--- **AI (Release 2.1)** -- Management of target designation.
|
||||
--- **AI R2.1** -- Management of target **Designation**.
|
||||
--
|
||||
-- --
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
||||
-- and communicates these to a dedicated attacking group of players,
|
||||
-- so that following a dynamically generated menu system,
|
||||
-- each detected set of potential targets can be lased or smoked...
|
||||
--
|
||||
-- Targets can be:
|
||||
--
|
||||
-- * **Lased** for a period of time.
|
||||
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
|
||||
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
|
||||
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
|
||||
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
|
||||
--
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module AI_Designate
|
||||
|
||||
|
||||
@@ -79,7 +105,7 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- ## 2. AI_DESIGNATE is a FSM
|
||||
--
|
||||
-- 
|
||||
-- ![Process]()
|
||||
--
|
||||
-- ### 2.1 AI_DESIGNATE States
|
||||
--
|
||||
@@ -111,7 +137,16 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!**
|
||||
--
|
||||
-- ## 4. Autolase to automatically lase detected targets.
|
||||
--
|
||||
-- _DetectionItems_ can be auto lased once detected by _Recces_. As such, there is almost no action required from the _Players_ using the _Designate Menu_.
|
||||
-- The **auto lase** function can be activated through the Designation Menu.
|
||||
-- Use the method @{#AI_DESIGNATE.SetAutoLase}() to activate or deactivate the auto lase function programmatically.
|
||||
-- Note that autolase will automatically activate lasing for ALL _DetectedItems_. Individual items can be switched-off if required using the _Designation Menu_.
|
||||
--
|
||||
-- AIDesignate:SetAutoLase( true )
|
||||
--
|
||||
-- Activate the auto lasing.
|
||||
--
|
||||
-- @field #AI_DESIGNATE
|
||||
--
|
||||
@@ -321,7 +356,7 @@ do -- AI_DESIGNATE
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #list<#number> LaserCodes
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:SetLaserCodes( LaserCodes )
|
||||
function AI_DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1
|
||||
|
||||
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
|
||||
self:E(self.LaserCodes)
|
||||
@@ -336,7 +371,7 @@ do -- AI_DESIGNATE
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @param #boolean AutoLase
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:SetAutoLase( AutoLase )
|
||||
function AI_DESIGNATE:SetAutoLase( AutoLase ) --R2.1
|
||||
|
||||
self.AutoLase = AutoLase
|
||||
|
||||
|
||||
@@ -224,14 +224,14 @@ do -- CARGO
|
||||
-- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo.
|
||||
|
||||
|
||||
--- (R2.1) CARGO Constructor. This class is an abstract class and should not be instantiated.
|
||||
--- CARGO Constructor. This class is an abstract class and should not be instantiated.
|
||||
-- @param #CARGO self
|
||||
-- @param #string Type
|
||||
-- @param #string Name
|
||||
-- @param #number Weight
|
||||
-- @param #number NearRadius (optional)
|
||||
-- @return #CARGO
|
||||
function CARGO:New( Type, Name, Weight )
|
||||
function CARGO:New( Type, Name, Weight ) --R2.1
|
||||
|
||||
local self = BASE:Inherit( self, FSM:New() ) -- #CARGO
|
||||
self:F( { Type, Name, Weight } )
|
||||
@@ -266,10 +266,10 @@ function CARGO:New( Type, Name, Weight )
|
||||
return self
|
||||
end
|
||||
|
||||
--- (R2.1) Get the name of the Cargo.
|
||||
--- Get the name of the Cargo.
|
||||
-- @param #CARGO self
|
||||
-- @return #string The name of the Cargo.
|
||||
function CARGO:GetName()
|
||||
function CARGO:GetName() --R2.1
|
||||
return self.Name
|
||||
end
|
||||
|
||||
|
||||
@@ -789,11 +789,11 @@ function POINT_VEC3:FlareRed( Azimuth )
|
||||
self:Flare( FLARECOLOR.Red, Azimuth )
|
||||
end
|
||||
|
||||
--- (R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.
|
||||
--- Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.
|
||||
-- @param #POINT_VEC3 self
|
||||
-- @param #POINT_VEC3 ToPointVec3
|
||||
-- @return #boolean true If the ToPointVec3 has LOS with the PointVec3, otherwise false.
|
||||
function POINT_VEC3:IsLOS( ToPointVec3 )
|
||||
function POINT_VEC3:IsLOS( ToPointVec3 ) --R2.1
|
||||
|
||||
-- Measurement of visibility should not be from the ground, so Adding a hypotethical 2 meters to each PointVec3.
|
||||
local FromVec3 = self:GetVec3()
|
||||
|
||||
@@ -91,11 +91,11 @@ SPAWNSTATIC = {
|
||||
-- @list <Core.Zone#ZONE_BASE> SpawnZone
|
||||
|
||||
|
||||
--- (R2.1) Creates the main object to spawn a @{Static} defined in the ME.
|
||||
--- Creates the main object to spawn a @{Static} defined in the ME.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #string SpawnTemplatePrefix is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID )
|
||||
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID ) --R2.1
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTemplatePrefix } )
|
||||
|
||||
@@ -113,11 +113,11 @@ function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID )
|
||||
return self
|
||||
end
|
||||
|
||||
--- (R2.1) Creates the main object to spawn a @{Static} based on a type name.
|
||||
--- Creates the main object to spawn a @{Static} based on a type name.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #string SpawnTypeName is the name of the type.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID )
|
||||
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID ) --R2.1
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTypeName } )
|
||||
|
||||
@@ -131,13 +131,13 @@ function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory,
|
||||
end
|
||||
|
||||
|
||||
--- (R2.1) Creates a new @{Static} from a POINT_VEC2.
|
||||
--- Creates a new @{Static} from a POINT_VEC2.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param Core.Point#POINT_VEC2 PointVec2 The 2D coordinate where to spawn the static.
|
||||
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
|
||||
-- @param #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName )
|
||||
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1
|
||||
self:F( { PointVec2, Heading, NewName } )
|
||||
|
||||
local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID]
|
||||
@@ -161,13 +161,13 @@ function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName )
|
||||
return Static
|
||||
end
|
||||
|
||||
--- (R2.1) Creates a new @{Static} from a @{Zone}.
|
||||
--- Creates a new @{Static} from a @{Zone}.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The Zone where to spawn the static.
|
||||
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
|
||||
-- @param #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName )
|
||||
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1
|
||||
self:F( { Zone, Heading, NewName } )
|
||||
|
||||
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
--- **Core (Release 2.1)** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
||||
--- **Core 2.1** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Spot lases points endlessly or for a duration.
|
||||
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
|
||||
--
|
||||
-- * Spot for a defined duration.
|
||||
-- * wiggle the spot at the target.
|
||||
-- * Provide a @{Unit} as a target, instead of a point.
|
||||
-- * Implement a status machine, LaseOn, LaseOff.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
@@ -22,9 +27,20 @@
|
||||
--
|
||||
-- ### [SPOT YouTube Channel]()
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- This module is still under construction, but is described above works already, and will keep working ...
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
|
||||
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
|
||||
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
|
||||
--
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Spot
|
||||
|
||||
@@ -32,10 +48,43 @@
|
||||
do
|
||||
|
||||
--- @type SPOT
|
||||
-- @extends Core.Base#BASE
|
||||
-- @extends Core.Fsm#FSM
|
||||
|
||||
|
||||
---
|
||||
--- # SPOT class, extends @{Fsm#FSM}
|
||||
--
|
||||
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
|
||||
--
|
||||
-- * Spot for a defined duration.
|
||||
-- * wiggle the spot at the target.
|
||||
-- * Provide a @{Unit} as a target, instead of a point.
|
||||
-- * Implement a status machine, LaseOn, LaseOff.
|
||||
--
|
||||
-- ## 1. SPOT constructor
|
||||
--
|
||||
-- * @{#SPOT.New}(): Creates a new SPOT object.
|
||||
--
|
||||
-- ## 2. SPOT is a FSM
|
||||
--
|
||||
-- ![Process]()
|
||||
--
|
||||
-- ### 2.1 SPOT States
|
||||
--
|
||||
-- * **Off**: Lasing is switched off.
|
||||
-- * **On**: Lasing is switched on.
|
||||
-- * **Destroyed**: Target is destroyed.
|
||||
--
|
||||
-- ### 2.2 SPOT Events
|
||||
--
|
||||
-- * **@{#SPOT.LaseOn}(Target, LaserCode, Duration)**: Lase to a target.
|
||||
-- * **@{#SPOT.LaseOff}()**: Stop lasing the target.
|
||||
-- * **@{#SPOT.Lasing}()**: Target is being lased.
|
||||
-- * **@{#SPOT.Destroyed}()**: Triggered when target is destroyed.
|
||||
--
|
||||
-- ## 3. Check if a Target is being lased
|
||||
--
|
||||
-- The method @{#SPOT.IsLasing}() indicates whether lasing is on or off.
|
||||
--
|
||||
-- @field #SPOT
|
||||
SPOT = {
|
||||
ClassName = "SPOT",
|
||||
|
||||
@@ -22,46 +22,6 @@
|
||||
--
|
||||
-- ### [SPAWN YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-04-08: SPAWN:**InitDelayOnOff( DelayOnOff )** added.
|
||||
-- 2017-04-08: SPAWN:**InitDelayOn()** added.
|
||||
-- 2017-04-08: SPAWN:**InitDelayOff()** added.
|
||||
--
|
||||
-- 2017-03-14: SPAWN:**InitKeepUnitNames()** added.
|
||||
-- 2017-03-14: SPAWN:**InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius )** added.
|
||||
--
|
||||
-- 2017-02-04: SPAWN:InitUnControlled( **UnControlled** ) replaces SPAWN:InitUnControlled().
|
||||
--
|
||||
-- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added.
|
||||
-- 2017-01-24: SPAWN:**InitAIOn()** added.
|
||||
-- 2017-01-24: SPAWN:**InitAIOff()** added.
|
||||
--
|
||||
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval ).
|
||||
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added.
|
||||
--
|
||||
-- 2016-08-14: SPAWN:**OnSpawnGroup**( SpawnCallBackFunction, ... ) replaces SPAWN:_SpawnFunction_( SpawnCallBackFunction, ... ).
|
||||
-- 2016-08-14: SPAWN.SpawnInZone( Zone, __RandomizeGroup__, SpawnIndex ) replaces SpawnInZone( Zone, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ).
|
||||
-- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added.
|
||||
-- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ).
|
||||
-- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
|
||||
-- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ).
|
||||
-- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_().
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
|
||||
@@ -428,14 +428,14 @@ function POSITIONABLE:MessageToGroup( Message, Duration, MessageGroup, Name )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- (R2.1) Send a message to a @{Set#SET_GROUP}.
|
||||
--- Send a message to a @{Set#SET_GROUP}.
|
||||
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #string Message The message text
|
||||
-- @param Dcs.DCSTypes#Duration Duration The duration of the message.
|
||||
-- @param Core.Set#SET_GROUP MessageSetGroup The SET_GROUP collection receiving the message.
|
||||
-- @param #string Name (optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
|
||||
function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Name )
|
||||
function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Name ) --R2.1
|
||||
self:F2( { Message, Duration } )
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
@@ -469,30 +469,30 @@ function POSITIONABLE:Message( Message, Duration, Name )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- (R2.1) Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE.
|
||||
--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE.
|
||||
-- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #RADIO Radio
|
||||
function POSITIONABLE:GetRadio()
|
||||
function POSITIONABLE:GetRadio() --R2.1
|
||||
self:F2(self)
|
||||
return RADIO:New(self)
|
||||
end
|
||||
|
||||
--- (R2.1) Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals
|
||||
--- Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #RADIO Radio
|
||||
function POSITIONABLE:GetBeacon()
|
||||
function POSITIONABLE:GetBeacon() --R2.1
|
||||
self:F2(self)
|
||||
return BEACON:New(self)
|
||||
end
|
||||
|
||||
--- (R2.1) Start Lasing a POSITIONABLE
|
||||
--- Start Lasing a POSITIONABLE
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #POSITIONABLE Target
|
||||
-- @param #number LaserCode
|
||||
-- @param #number Duration
|
||||
-- @return Core.Spot#SPOT
|
||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
|
||||
self:F2()
|
||||
|
||||
LaserCode = LaserCode or math.random( 1000, 9999 )
|
||||
@@ -509,10 +509,10 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
|
||||
|
||||
end
|
||||
|
||||
--- (R2.1) Stop Lasing a POSITIONABLE
|
||||
--- Stop Lasing a POSITIONABLE
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #POSITIONABLE
|
||||
function POSITIONABLE:LaseOff()
|
||||
function POSITIONABLE:LaseOff() --R2.1
|
||||
self:F2()
|
||||
|
||||
if self.Spot then
|
||||
@@ -523,10 +523,10 @@ function POSITIONABLE:LaseOff()
|
||||
return self
|
||||
end
|
||||
|
||||
--- (R2.1) Check if the POSITIONABLE is lasing a target
|
||||
--- Check if the POSITIONABLE is lasing a target
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #boolean true if it is lasing a target
|
||||
function POSITIONABLE:IsLasing()
|
||||
function POSITIONABLE:IsLasing() --R2.1
|
||||
self:F2()
|
||||
|
||||
local Lasing = false
|
||||
@@ -538,18 +538,18 @@ function POSITIONABLE:IsLasing()
|
||||
return Lasing
|
||||
end
|
||||
|
||||
--- (R2.1) Get the Spot
|
||||
--- Get the Spot
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return Core.Spot#SPOT The Spot
|
||||
function POSITIONABLE:GetSpot()
|
||||
function POSITIONABLE:GetSpot() --R2.1
|
||||
|
||||
return self.Spot
|
||||
end
|
||||
|
||||
--- (R2.1) Get the last assigned laser code
|
||||
--- Get the last assigned laser code
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #number The laser code
|
||||
function POSITIONABLE:GetLaserCode()
|
||||
function POSITIONABLE:GetLaserCode() --R2.1
|
||||
|
||||
return self.LaserCode
|
||||
end
|
||||
|
||||
@@ -1012,22 +1012,22 @@ end
|
||||
|
||||
do -- Detection
|
||||
|
||||
--- (R2.1) Returns if a unit is detecting the TargetUnit.
|
||||
--- Returns if a unit is detecting the TargetUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param #UNIT TargetUnit
|
||||
-- @return #boolean true If the TargetUnit is detected by the unit, otherwise false.
|
||||
function UNIT:IsDetected( TargetUnit )
|
||||
function UNIT:IsDetected( TargetUnit ) --R2.1
|
||||
|
||||
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity = self:IsTargetDetected( TargetUnit:GetDCSObject() )
|
||||
|
||||
return TargetIsDetected
|
||||
end
|
||||
|
||||
--- (R2.1) Returns if a unit has Line of Sight (LOS) with the TargetUnit.
|
||||
--- Returns if a unit has Line of Sight (LOS) with the TargetUnit.
|
||||
-- @param #UNIT self
|
||||
-- @param #UNIT TargetUnit
|
||||
-- @return #boolean true If the TargetUnit has LOS with the unit, otherwise false.
|
||||
function UNIT:IsLOS( TargetUnit )
|
||||
function UNIT:IsLOS( TargetUnit ) --R2.1
|
||||
|
||||
local IsLOS = self:GetPointVec3():IsLOS( TargetUnit:GetPointVec3() )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user