mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Compare commits
111 Commits
v0.1.0-alp
...
v0.3.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27bdc65cd7 | ||
|
|
1cb97aca38 | ||
|
|
df783226cb | ||
|
|
62d04113d3 | ||
|
|
6a06632a5e | ||
|
|
83d5338b16 | ||
|
|
9b0879626f | ||
|
|
fe36e0ee2a | ||
|
|
d198da5ada | ||
|
|
2eb784abad | ||
|
|
cbcc9b411f | ||
|
|
1fef4793ca | ||
|
|
ff689b05be | ||
|
|
219f44e008 | ||
|
|
7a91bdff72 | ||
|
|
f20ba8985b | ||
|
|
75b2a668dd | ||
|
|
37c8bb5477 | ||
|
|
0a66cb6a59 | ||
|
|
bca06c1dbf | ||
|
|
128bb0cc2c | ||
|
|
fe8438648c | ||
|
|
d1b3de1940 | ||
|
|
6dd4bc638e | ||
|
|
971f5e9ca4 | ||
|
|
e486c80350 | ||
|
|
01531f0c73 | ||
|
|
4d40f28cf8 | ||
|
|
e71c02b885 | ||
|
|
15b189d747 | ||
|
|
5990650529 | ||
|
|
b836ca5fcd | ||
|
|
45cc120f76 | ||
|
|
db2cc49b85 | ||
|
|
37ec8c294f | ||
|
|
b7a2e8b278 | ||
|
|
4667e7c41c | ||
|
|
9f8bfa1603 | ||
|
|
812c4216c5 | ||
|
|
34d268b451 | ||
|
|
7e8090f772 | ||
|
|
bfb1bcc232 | ||
|
|
8ef6ef14dd | ||
|
|
3965c5e254 | ||
|
|
aaa3ab07e3 | ||
|
|
38244f10dd | ||
|
|
1949d69fa0 | ||
|
|
c68e4cd257 | ||
|
|
4704afdc6c | ||
|
|
979de8901c | ||
|
|
ad2c3ed83f | ||
|
|
bfeaa961f6 | ||
|
|
4adf5aa188 | ||
|
|
1d9da407b9 | ||
|
|
f981200409 | ||
|
|
f8a5ebdadb | ||
|
|
f95555732d | ||
|
|
d70162cf96 | ||
|
|
25330755e2 | ||
|
|
55eb06b2d9 | ||
|
|
92289ecd16 | ||
|
|
cbdd287833 | ||
|
|
bce2a40d63 | ||
|
|
7bb367d3ff | ||
|
|
a693ee76bf | ||
|
|
203d15cecb | ||
|
|
f0a9bed293 | ||
|
|
780a0e02cc | ||
|
|
2f2aa5c0f8 | ||
|
|
ecaa98a46c | ||
|
|
94960b4cb3 | ||
|
|
6ed7796b6d | ||
|
|
4e43fc3c01 | ||
|
|
9923159df8 | ||
|
|
c232c2722a | ||
|
|
3b6969050f | ||
|
|
0ed25f690e | ||
|
|
dcdf619a52 | ||
|
|
291c4e5ba9 | ||
|
|
3159561a02 | ||
|
|
cb56710b4d | ||
|
|
4702662c95 | ||
|
|
6a28902305 | ||
|
|
557a46173b | ||
|
|
0990e34fef | ||
|
|
88e0b17741 | ||
|
|
10177331b4 | ||
|
|
fe6d94466d | ||
|
|
979ce38422 | ||
|
|
218e435581 | ||
|
|
79e4e7cde8 | ||
|
|
49fc0bde16 | ||
|
|
391408de9b | ||
|
|
243009704d | ||
|
|
f536658639 | ||
|
|
56fca825f0 | ||
|
|
847813c741 | ||
|
|
60005abfbd | ||
|
|
2538308e4e | ||
|
|
92bf378a1c | ||
|
|
6fba093b77 | ||
|
|
7893302d89 | ||
|
|
598cfefba4 | ||
|
|
1acf66f74d | ||
|
|
994dc44f00 | ||
|
|
620844b7e0 | ||
|
|
ab4f4e75d1 | ||
|
|
01c85670ec | ||
|
|
66c7ebf786 | ||
|
|
ba44e39344 | ||
|
|
a8f51751f1 |
@@ -4,14 +4,25 @@
|
||||
--- @type CoalitionObject
|
||||
-- @extends DCSObject#Object
|
||||
|
||||
--- @type coalition
|
||||
-- @field #coalition.side side
|
||||
|
||||
--- @type coalition.side
|
||||
-- @field NEUTRAL
|
||||
-- @field RED
|
||||
-- @field BLUE
|
||||
|
||||
coalition = {} --#coalition
|
||||
|
||||
--- Returns coalition of the object.
|
||||
-- @function [parent=#CoalitionObject] getCoalition
|
||||
-- @param self
|
||||
-- @return #coalition.side
|
||||
-- @param #CoalitionObject self
|
||||
-- @return DCSTypes#coalition.side
|
||||
|
||||
--- Returns object country.
|
||||
-- @function [parent=#CoalitionObject] getCountry
|
||||
-- @param self
|
||||
-- @param #CoalitionObject self
|
||||
-- @return #country.id
|
||||
|
||||
|
||||
CoalitionObject = {} --#CoalitionObject
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
-- @module DCSTypes
|
||||
|
||||
|
||||
|
||||
--- Time is given in seconds.
|
||||
-- @type Time
|
||||
-- @extends #number
|
||||
|
||||
35
Dcs/DCSworld.lua
Normal file
35
Dcs/DCSworld.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- @module DCSWorld
|
||||
|
||||
--- @type world
|
||||
-- @field #world.event event
|
||||
|
||||
|
||||
--- @type world.event
|
||||
-- @field S_EVENT_INVALID
|
||||
-- @field S_EVENT_SHOT
|
||||
-- @field S_EVENT_HIT
|
||||
-- @field S_EVENT_TAKEOFF
|
||||
-- @field S_EVENT_LAND
|
||||
-- @field S_EVENT_CRASH
|
||||
-- @field S_EVENT_EJECTION
|
||||
-- @field S_EVENT_REFUELING
|
||||
-- @field S_EVENT_DEAD
|
||||
-- @field S_EVENT_PILOT_DEAD
|
||||
-- @field S_EVENT_BASE_CAPTURED
|
||||
-- @field S_EVENT_MISSION_START
|
||||
-- @field S_EVENT_MISSION_END
|
||||
-- @field S_EVENT_TOOK_CONTROL
|
||||
-- @field S_EVENT_REFUELING_STOP
|
||||
-- @field S_EVENT_BIRTH
|
||||
-- @field S_EVENT_HUMAN_FAILURE
|
||||
-- @field S_EVENT_ENGINE_STARTUP
|
||||
-- @field S_EVENT_ENGINE_SHUTDOWN
|
||||
-- @field S_EVENT_PLAYER_ENTER_UNIT
|
||||
-- @field S_EVENT_PLAYER_LEAVE_UNIT
|
||||
-- @field S_EVENT_PLAYER_COMMENT
|
||||
-- @field S_EVENT_SHOOTING_START
|
||||
-- @field S_EVENT_SHOOTING_END
|
||||
-- @field S_EVENT_MAX
|
||||
|
||||
world = {} --#world
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,31 +28,87 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>Base</code></h1>
|
||||
|
||||
<p>The BASE class for all the classes defined within MOOSE.</p>
|
||||
<p>BASE classes.</p>
|
||||
|
||||
|
||||
|
||||
<h1><a href="##(BASE)">#BASE</a> class</h1>
|
||||
<p>The <a href="##(BASE)">#BASE</a> class is the super class for most of the classes defined within MOOSE.</p>
|
||||
|
||||
<p>It handles:</p>
|
||||
|
||||
<ul>
|
||||
<li>The construction and inheritance of child classes.</li>
|
||||
<li>The tracing of objects during mission execution within the DCS.log file (under saved games folder).</li>
|
||||
</ul>
|
||||
|
||||
<p>Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.</p>
|
||||
|
||||
<h1>BASE Trace functionality</h1>
|
||||
<p>The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
Note that these trace methods are inherited by each MOOSE class interiting BASE.
|
||||
As such, each object created from derived class from BASE can use the tracing functions to trace its execution.</p>
|
||||
|
||||
<h2>Trace a function call</h2>
|
||||
<p>There are basically 3 types of tracing methods available within BASE:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F">BASE.F</a>: Trace the beginning of a function and its given parameters.</li>
|
||||
<li><a href="##(BASE).T">BASE.T</a>: Trace further logic within a function giving optional variables or parameters.</li>
|
||||
<li><a href="##(BASE).E">BASE.E</a>: Trace an execption within a function giving optional variables or parameters. An exception will always be traced.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Tracing levels</h2>
|
||||
<p>There are 3 tracing levels within MOOSE. <br/>
|
||||
These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.</p>
|
||||
|
||||
<p>As such, the F and T methods have additional variants to trace level 2 and 3 respectively:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F2">BASE.F2</a>: Trace the beginning of a function and its given parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).F3">BASE.F3</a>: Trace the beginning of a function and its given parameters with tracing level 3.</li>
|
||||
<li><a href="##(BASE).T2">BASE.T2</a>: Trace further logic within a function giving optional variables or parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).T3">BASE.T3</a>: Trace further logic within a function giving optional variables or parameters with tracing level 3.</li>
|
||||
</ul>
|
||||
|
||||
<h1>BASE Inheritance support</h1>
|
||||
<p>The following methods are available to support inheritance:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).Inherit">BASE.Inherit</a>: Inherits from a class.</li>
|
||||
<li><a href="##(BASE).Inherited">BASE.Inherited</a>: Returns the parent class from the class.</li>
|
||||
</ul>
|
||||
|
||||
<h1>Future</h1>
|
||||
<p>Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -127,6 +173,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).EnableEvents">BASE:EnableEvents()</a></td>
|
||||
<td class="summary">
|
||||
<p>Enable the event listeners for the class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).Event">BASE:Event()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the event dispatcher</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -467,6 +519,24 @@ A #table or any field.</p>
|
||||
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).Event" >
|
||||
<strong>BASE:Event()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the event dispatcher</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Event.html##(EVENT)">Event#EVENT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li>CARGO</li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -210,6 +201,8 @@
|
||||
</dl>
|
||||
<h2><a id="#(CARGO)" >Type <code>CARGO</code></a></h2>
|
||||
|
||||
<h2><a id="#(CARGO_ZONE)" >Type <code>CARGO_ZONE</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li>CleanUp</li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -139,27 +130,33 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventAddForCleanUp">CLEANUP:_EventAddForCleanUp(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventAddForCleanUp">CLEANUP:_EventAddForCleanUp(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if the Unit has an S<em>EVENT</em>ENGINE<em>SHUTDOWN or an S</em>EVENT_HIT within the given ZoneNames.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventCrash">CLEANUP:_EventCrash(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventCrash">CLEANUP:_EventCrash(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if a crash event occurs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventHitCleanUp">CLEANUP:_EventHitCleanUp(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventHitCleanUp">CLEANUP:_EventHitCleanUp(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if the Unit has an S<em>EVENT</em>HIT within the given ZoneNames.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventShot">CLEANUP:_EventShot(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventShot">CLEANUP:_EventShot(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if a unit shoots a missile.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._OnEventBirth">CLEANUP:_OnEventBirth(Event)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -394,7 +391,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventAddForCleanUp" >
|
||||
<strong>CLEANUP:_EventAddForCleanUp(event)</strong>
|
||||
<strong>CLEANUP:_EventAddForCleanUp(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -404,12 +401,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this is the case, add the Group to the CLEANUP List.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -418,7 +420,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventCrash" >
|
||||
<strong>CLEANUP:_EventCrash(event)</strong>
|
||||
<strong>CLEANUP:_EventCrash(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -428,12 +430,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>Crashed units go into a CleanUpList for removal.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -442,7 +449,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventHitCleanUp" >
|
||||
<strong>CLEANUP:_EventHitCleanUp(event)</strong>
|
||||
<strong>CLEANUP:_EventHitCleanUp(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -452,12 +459,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this is the case, destroy the unit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -466,7 +478,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventShot" >
|
||||
<strong>CLEANUP:_EventShot(event)</strong>
|
||||
<strong>CLEANUP:_EventShot(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -476,12 +488,38 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this occurs within one of the zones, then the weapon used must be destroyed.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._OnEventBirth" >
|
||||
<strong>CLEANUP:_OnEventBirth(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li>Client</li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -65,8 +56,20 @@
|
||||
<p>The CLIENT models client units in multi player missions.</p>
|
||||
|
||||
|
||||
<p>Clients are those groups defined within the Mission Editor that have the skillset defined as "Client" or "Player".
|
||||
Note that clients are NOT the same as groups, they are NOT necessarily alive. </p>
|
||||
|
||||
<h1><a href="##(CLIENT)">#CLIENT</a> class</h1>
|
||||
<p>Clients are those <strong>Units</strong> defined within the Mission Editor that have the skillset defined as <strong>Client</strong> or <strong>Player</strong>.
|
||||
Note that clients are NOT the same as Units, they are NOT necessarily alive.</p>
|
||||
|
||||
<p>Clients are being used by the <a href="MISSION.html">MISSION</a> class to follow players and register their successes.</p>
|
||||
|
||||
<h1>CLIENT construction methods:</h1>
|
||||
<p>Create a new CLIENT object with the <a href="##(CLIENT).New">CLIENT.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(CLIENT).New">CLIENT.New</a>: Creates a new CLIENT object taking the name of the <strong>DCSUnit</strong> that is a client as defined within the mission editor.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -74,12 +77,6 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
<td class="name" nowrap="nowrap"><a href="#CLIENT">CLIENT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ClientGroupUnit">ClientGroupUnit</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -92,7 +89,7 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
</td>
|
||||
@@ -158,13 +155,13 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientID">CLIENT.ClientID</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientName">CLIENT.ClientName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientName">CLIENT.ClientName</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientParameters">CLIENT.ClientParameters</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@@ -215,12 +212,36 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetDCSGroup">CLIENT:GetDCSGroup()</a></td>
|
||||
<td class="summary">
|
||||
<p>Return the DCSGroup of a Client.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetID">CLIENT:GetID()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetName">CLIENT:GetName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetPointVec2">CLIENT:GetPointVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the position of the CLIENT in <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> format..</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetPositionVec3">CLIENT:GetPositionVec3()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).GetTypeName">CLIENT:GetTypeName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -280,7 +301,7 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).New">CLIENT:New(ClientName, ClientBriefing)</a></td>
|
||||
<td class="summary">
|
||||
<p>Use this method to register new Clients within the MOF.</p>
|
||||
<p>Use this method to register new Clients within a mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -346,20 +367,6 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="ClientGroupUnit" >
|
||||
<strong>ClientGroupUnit</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(Client)" >Type <code>Client</code></a></h2>
|
||||
@@ -400,20 +407,25 @@ is the text defining the Mission briefing.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).Alive" >
|
||||
<strong>CLIENT:Alive(CallBack)</strong>
|
||||
<strong>CLIENT:Alive(CallBack, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function CallBack </em></code>:
|
||||
Function.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
@@ -524,6 +536,7 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientGroupID" >
|
||||
<strong>CLIENT.ClientGroupID</strong>
|
||||
</a>
|
||||
@@ -551,7 +564,6 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientGroupUnit" >
|
||||
<strong>CLIENT.ClientGroupUnit</strong>
|
||||
</a>
|
||||
@@ -565,9 +577,8 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientID" >
|
||||
<strong>CLIENT.ClientID</strong>
|
||||
<a id="#(CLIENT).ClientName" >
|
||||
<strong>CLIENT.ClientName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -579,8 +590,9 @@ Function.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).ClientName" >
|
||||
<strong>CLIENT.ClientName</strong>
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientParameters" >
|
||||
<strong>CLIENT.ClientParameters</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -731,6 +743,32 @@ Function.</p>
|
||||
<p><em><a href="DCSGroup.html##(Group)">DCSGroup#Group</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetID" >
|
||||
<strong>CLIENT:GetID()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetName" >
|
||||
<strong>CLIENT:GetName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -749,6 +787,32 @@ Function.</p>
|
||||
<p><em><a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetPositionVec3" >
|
||||
<strong>CLIENT:GetPositionVec3()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).GetTypeName" >
|
||||
<strong>CLIENT:GetTypeName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -930,14 +994,14 @@ is the interval in seconds between the display of the <a href="Message.html##(ME
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Use this method to register new Clients within the MOF.</p>
|
||||
<p>Use this method to register new Clients within a mission.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ClientName </em></code>:
|
||||
Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client.</p>
|
||||
Name of the DCS <strong>Unit</strong> as defined within the Mission Editor.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -70,6 +73,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="#CoalitionObject">CoalitionObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#coalition">coalition</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -85,6 +94,38 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(CoalitionObject).getCountry">CoalitionObject:getCountry()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns object country.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(coalition)">Type <code>coalition</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition).side">coalition.side</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(coalition.side)">Type <code>coalition.side</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).BLUE">coalition.side.BLUE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).NEUTRAL">coalition.side.NEUTRAL</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).RED">coalition.side.RED</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -102,6 +143,20 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(coalition)">#coalition</a></em>
|
||||
<a id="coalition" >
|
||||
<strong>coalition</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(DCSCoalitionObject)" >Type <code>DCSCoalitionObject</code></a></h2>
|
||||
@@ -121,7 +176,7 @@
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(coalition.side)">#coalition.side</a>:</em></p>
|
||||
<p><em><a href="DCSTypes.html##(coalition.side)">DCSTypes#coalition.side</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -142,11 +197,68 @@
|
||||
<p><em><a href="##(country.id)">#country.id</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(coalition)" >Type <code>coalition</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(coalition.side)">#coalition.side</a></em>
|
||||
<a id="#(coalition).side" >
|
||||
<strong>coalition.side</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(coalition.side)" >Type <code>coalition.side</code></a></h2>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).BLUE" >
|
||||
<strong>coalition.side.BLUE</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).NEUTRAL" >
|
||||
<strong>coalition.side.NEUTRAL</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).RED" >
|
||||
<strong>coalition.side.RED</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(country.id)" >Type <code>country.id</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li>DCSTask</li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li>DCSTypes</li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li>DCSUnit</li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
609
Documentation/DCSWorld.html
Normal file
609
Documentation/DCSWorld.html
Normal file
@@ -0,0 +1,609 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li>DCSWorld</li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>DCSWorld</code></h1>
|
||||
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#world">world</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(world)">Type <code>world</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world).event">world.event</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(world.event)">Type <code>world.event</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_BASE_CAPTURED">world.event.S_EVENT_BASE_CAPTURED</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_BIRTH">world.event.S_EVENT_BIRTH</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_CRASH">world.event.S_EVENT_CRASH</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_DEAD">world.event.S_EVENT_DEAD</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_EJECTION">world.event.S_EVENT_EJECTION</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_ENGINE_SHUTDOWN">world.event.S_EVENT_ENGINE_SHUTDOWN</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_ENGINE_STARTUP">world.event.S_EVENT_ENGINE_STARTUP</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_HIT">world.event.S_EVENT_HIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_HUMAN_FAILURE">world.event.S_EVENT_HUMAN_FAILURE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_INVALID">world.event.S_EVENT_INVALID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_LAND">world.event.S_EVENT_LAND</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MAX">world.event.S_EVENT_MAX</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MISSION_END">world.event.S_EVENT_MISSION_END</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MISSION_START">world.event.S_EVENT_MISSION_START</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PILOT_DEAD">world.event.S_EVENT_PILOT_DEAD</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_COMMENT">world.event.S_EVENT_PLAYER_COMMENT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_ENTER_UNIT">world.event.S_EVENT_PLAYER_ENTER_UNIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_LEAVE_UNIT">world.event.S_EVENT_PLAYER_LEAVE_UNIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_REFUELING">world.event.S_EVENT_REFUELING</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_REFUELING_STOP">world.event.S_EVENT_REFUELING_STOP</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOOTING_END">world.event.S_EVENT_SHOOTING_END</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOOTING_START">world.event.S_EVENT_SHOOTING_START</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOT">world.event.S_EVENT_SHOT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_TAKEOFF">world.event.S_EVENT_TAKEOFF</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_TOOK_CONTROL">world.event.S_EVENT_TOOK_CONTROL</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(world)">#world</a></em>
|
||||
<a id="world" >
|
||||
<strong>world</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(DCSWorld)" >Type <code>DCSWorld</code></a></h2>
|
||||
|
||||
<h2><a id="#(world)" >Type <code>world</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(world.event)">#world.event</a></em>
|
||||
<a id="#(world).event" >
|
||||
<strong>world.event</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(world.event)" >Type <code>world.event</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_BASE_CAPTURED" >
|
||||
<strong>world.event.S_EVENT_BASE_CAPTURED</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_BIRTH" >
|
||||
<strong>world.event.S_EVENT_BIRTH</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_CRASH" >
|
||||
<strong>world.event.S_EVENT_CRASH</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_DEAD" >
|
||||
<strong>world.event.S_EVENT_DEAD</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_EJECTION" >
|
||||
<strong>world.event.S_EVENT_EJECTION</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_ENGINE_SHUTDOWN" >
|
||||
<strong>world.event.S_EVENT_ENGINE_SHUTDOWN</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_ENGINE_STARTUP" >
|
||||
<strong>world.event.S_EVENT_ENGINE_STARTUP</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_HIT" >
|
||||
<strong>world.event.S_EVENT_HIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_HUMAN_FAILURE" >
|
||||
<strong>world.event.S_EVENT_HUMAN_FAILURE</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_INVALID" >
|
||||
<strong>world.event.S_EVENT_INVALID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_LAND" >
|
||||
<strong>world.event.S_EVENT_LAND</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MAX" >
|
||||
<strong>world.event.S_EVENT_MAX</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MISSION_END" >
|
||||
<strong>world.event.S_EVENT_MISSION_END</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MISSION_START" >
|
||||
<strong>world.event.S_EVENT_MISSION_START</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PILOT_DEAD" >
|
||||
<strong>world.event.S_EVENT_PILOT_DEAD</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_COMMENT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_COMMENT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_ENTER_UNIT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_ENTER_UNIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_LEAVE_UNIT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_LEAVE_UNIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_REFUELING" >
|
||||
<strong>world.event.S_EVENT_REFUELING</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_REFUELING_STOP" >
|
||||
<strong>world.event.S_EVENT_REFUELING_STOP</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOOTING_END" >
|
||||
<strong>world.event.S_EVENT_SHOOTING_END</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOOTING_START" >
|
||||
<strong>world.event.S_EVENT_SHOOTING_START</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOT" >
|
||||
<strong>world.event.S_EVENT_SHOT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_TAKEOFF" >
|
||||
<strong>world.event.S_EVENT_TAKEOFF</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_TOOK_CONTROL" >
|
||||
<strong>world.event.S_EVENT_TOOK_CONTROL</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li>DCStimer</li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li>DEPLOYTASK</li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li>DESTROYBASETASK</li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -97,7 +88,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).EventDead">DESTROYBASETASK.EventDead(event, self)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).EventDead">DESTROYBASETASK:EventDead(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handle the S<em>EVENT</em>DEAD events to validate the destruction of units for the task monitoring.</p>
|
||||
</td>
|
||||
@@ -109,7 +100,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).New">DESTROYBASETASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).New">DESTROYBASETASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupPrefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new DESTROYBASETASK.</p>
|
||||
</td>
|
||||
@@ -188,25 +179,19 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYBASETASK).EventDead" >
|
||||
<strong>DESTROYBASETASK.EventDead(event, self)</strong>
|
||||
<strong>DESTROYBASETASK:EventDead(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handle the S<em>EVENT</em>DEAD events to validate the destruction of units for the task monitoring.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<pre><code> Event structure of DCS world.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>:
|
||||
structure of MOOSE.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -230,7 +215,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYBASETASK).New" >
|
||||
<strong>DESTROYBASETASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage)</strong>
|
||||
<strong>DESTROYBASETASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupPrefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -241,52 +226,32 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".</p>
|
||||
<p><code><em>#string DestroyGroupType </em></code>:
|
||||
Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".</p>
|
||||
<p><code><em>#string DestroyUnitType </em></code>:
|
||||
Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> table </em></code>:
|
||||
string,...} DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.</p>
|
||||
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||
string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnitType </em></code>: </p>
|
||||
<p><code><em>#number DestroyPercentage </em></code>:
|
||||
defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupPrefixes </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyPercentage </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
@@ -332,6 +297,8 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li>DESTROYGROUPSTASK</li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -88,13 +79,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).New">DESTROYGROUPSTASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).New">DESTROYGROUPSTASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new DESTROYGROUPSTASK.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).ReportGoalProgress">DESTROYGROUPSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).ReportGoalProgress">DESTROYGROUPSTASK:ReportGoalProgress(DestroyGroup, DestroyUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Report Goal Progress.</p>
|
||||
</td>
|
||||
@@ -150,7 +141,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYGROUPSTASK).New" >
|
||||
<strong>DESTROYGROUPSTASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage)</strong>
|
||||
<strong>DESTROYGROUPSTASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -161,53 +152,35 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyGroupType String describing the group to be destroyed.</p>
|
||||
<p><code><em>#string DestroyGroupType </em></code>: </p>
|
||||
<pre><code>String describing the group to be destroyed.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyUnitType String describing the unit to be destroyed.</p>
|
||||
<p><code><em>#string DestroyUnitType </em></code>: </p>
|
||||
<pre><code>String describing the unit to be destroyed.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> table </em></code>:
|
||||
string,...} DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.</p>
|
||||
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||
string> DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.
|
||||
<p><code><em>#number DestroyPercentage </em></code>:
|
||||
defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.
|
||||
-@return DESTROYGROUPSTASK</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnitType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupNames </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyPercentage </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -216,7 +189,7 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYGROUPSTASK).ReportGoalProgress" >
|
||||
<strong>DESTROYGROUPSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</strong>
|
||||
<strong>DESTROYGROUPSTASK:ReportGoalProgress(DestroyGroup, DestroyUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -227,35 +200,27 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Group </em></code>:
|
||||
DestroyGroup Group structure describing the group to be evaluated.</p>
|
||||
<p><code><em><a href="DCSGroup.html##(Group)">DCSGroup#Group</a> DestroyGroup </em></code>:
|
||||
Group structure describing the group to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Unit </em></code>:
|
||||
DestroyUnit Unit structure describing the Unit to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnit </em></code>: </p>
|
||||
<p><code><em><a href="DCSUnit.html##(Unit)">DCSUnit#Unit</a> DestroyUnit </em></code>:
|
||||
Unit structure describing the Unit to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The DestroyCount reflecting the amount of units destroyed within the group.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li>DESTROYUNITTYPESTASK</li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li>Escort</li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -65,15 +56,19 @@
|
||||
<p>Taking the lead of AI escorting your flight.</p>
|
||||
|
||||
|
||||
<p>The ESCORT class allows you to interact with escorting AI on your flight and take the lead.
|
||||
|
||||
<h1><a href="##(ESCORT)">#ESCORT</a> class</h1>
|
||||
<p>The <a href="##(ESCORT)">#ESCORT</a> class allows you to interact with escorting AI on your flight and take the lead.
|
||||
Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).</p>
|
||||
|
||||
<p>The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes.
|
||||
Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.</p>
|
||||
|
||||
<h1>RADIO MENUs that can be created:</h1>
|
||||
<p>Find a summary below of the current available commands:</p>
|
||||
|
||||
<p><strong>1. Navigation ...:</strong> Escort group navigation functions:</p>
|
||||
<h2>Navigation ...:</h2>
|
||||
<p>Escort group navigation functions:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Join-Up and Follow at x meters":</strong> The escort group fill follow you at about x meters, and they will follow you.</li>
|
||||
@@ -81,14 +76,16 @@ Ships and Ground troops will have a more limited set, but they can provide suppo
|
||||
<li><strong>"Smoke":</strong> Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>2. Hold position ...:</strong> Escort group navigation functions:</p>
|
||||
<h2>Hold position ...:</h2>
|
||||
<p>Escort group navigation functions:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"At current location":</strong> Stops the escort group and they will hover 30 meters above the ground at the position they stopped.</li>
|
||||
<li><strong>"At client location":</strong> Stops the escort group and they will hover 30 meters above the ground at the position they stopped.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>3. Report targets ...:</strong> Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).</p>
|
||||
<h2>Report targets ...:</h2>
|
||||
<p>Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Report now":</strong> Will report the current detected targets.</li>
|
||||
@@ -96,21 +93,25 @@ Ships and Ground troops will have a more limited set, but they can provide suppo
|
||||
<li><strong>"Report targets off":</strong> Will stop detecting targets.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>4. Scan targets ...:</strong> Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.</p>
|
||||
<h2>Scan targets ...:</h2>
|
||||
<p>Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Scan targets 30 seconds":</strong> Scan 30 seconds for targets.</li>
|
||||
<li><strong>"Scan targets 60 seconds":</strong> Scan 60 seconds for targets.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>5. Attack targets ...:</strong> This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.</p>
|
||||
<h2>Attack targets ...:</h2>
|
||||
<p>This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.</p>
|
||||
|
||||
<p><strong>6. Request assistance from ...:</strong> This menu item will list all detected targets within a 15km range, as with the menu item <strong>Attack Targets</strong>.
|
||||
<h2>Request assistance from ...:</h2>
|
||||
<p>This menu item will list all detected targets within a 15km range, as with the menu item <strong>Attack Targets</strong>.
|
||||
This menu item allows to request attack support from other escorts supporting the current client group.
|
||||
eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles.
|
||||
eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.</p>
|
||||
|
||||
<p><strong>7. ROE ...:</strong> Defines the Rules of Engagement of the escort group when in flight.</p>
|
||||
<h2>ROE ...:</h2>
|
||||
<p>Sets the Rules of Engagement (ROE) of the escort group when in flight.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Hold Fire":</strong> The escort group will hold fire.</li>
|
||||
@@ -119,7 +120,8 @@ eg. the function allows a player to request support from other Planes escorting
|
||||
<li><strong>"Weapon Free":</strong> The escort group will engage with any target.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>8. Evasion ...:</strong> Will define the evasion techniques that the escort group will perform during flight or combat.</p>
|
||||
<h2>Evasion ...:</h2>
|
||||
<p>Will define the evasion techniques that the escort group will perform during flight or combat.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Fight until death":</strong> The escort group will have no reaction to threats.</li>
|
||||
@@ -128,27 +130,31 @@ eg. the function allows a player to request support from other Planes escorting
|
||||
<li><strong>"Go below radar and evade fire":</strong> The escort group will perform evasive vertical manoeuvres.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>9. Resume Mission ...:</strong> Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
<h2>Resume Mission ...:</h2>
|
||||
<p>Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.</p>
|
||||
|
||||
<p><strong>10. Abort Current Task:</strong> Cancel the current task and rejoin formation.</p>
|
||||
<h1>ESCORT construction methods.</h1>
|
||||
<p>Create a new SPAWN object with the <a href="##(ESCORT).New">ESCORT.New</a> method:</p>
|
||||
|
||||
<ol>
|
||||
<li><h2>ESCORT object construction methods.</h2>
|
||||
<p>Create a new SPAWN object with the <a href="##(ESCORT).New">ESCORT.New</a> method:</p></li>
|
||||
<li><p><a href="##(ESCORT).New">ESCORT.New</a>: Creates a new ESCORT object from a <a href="Group.html##(GROUP)">Group#GROUP</a> for a <a href="Client.html##(CLIENT)">Client#CLIENT</a>, with an optional briefing text.</p></li>
|
||||
<li><h2>ESCORT object initialization methods.</h2>
|
||||
<p>The following menus can be setup:</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuFollowAt">ESCORT.MenuFollowAt</a>: Creates a menu to make the escort follow the client.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuHoldAtEscortPosition">ESCORT.MenuHoldAtEscortPosition</a>: Creates a menu to hold the escort at its current position.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuHoldAtLeaderPosition">ESCORT.MenuHoldAtLeaderPosition</a>: Creates a menu to hold the escort at the client position.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuScanForTargets">ESCORT.MenuScanForTargets</a>: Creates a menu so that the escort scans targets.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuFlare">ESCORT.MenuFlare</a>: Creates a menu to disperse flares.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuSmoke">ESCORT.MenuSmoke</a>: Creates a menu to disparse smoke.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuReportTargets">ESCORT.MenuReportTargets</a>: Creates a menu so that the escort reports targets.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuReportPosition">ESCORT.MenuReportPosition</a>: Creates a menu so that the escort reports its current position from bullseye.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuAssistedAttack">ESCORT.MenuAssistedAttack</a>: Creates a menu structure so that the escort can resume from a waypoint.</p></li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li><a href="##(ESCORT).New">ESCORT.New</a>: Creates a new ESCORT object from a <a href="Group.html##(GROUP)">Group#GROUP</a> for a <a href="Client.html##(CLIENT)">Client#CLIENT</a>, with an optional briefing text.</li>
|
||||
</ul>
|
||||
|
||||
<h1>ESCORT initialization methods.</h1>
|
||||
<p>The following menus are created within the RADIO MENU of an active unit hosted by a player:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ESCORT).MenuFollowAt">ESCORT.MenuFollowAt</a>: Creates a menu to make the escort follow the client.</li>
|
||||
<li><a href="##(ESCORT).MenuHoldAtEscortPosition">ESCORT.MenuHoldAtEscortPosition</a>: Creates a menu to hold the escort at its current position.</li>
|
||||
<li><a href="##(ESCORT).MenuHoldAtLeaderPosition">ESCORT.MenuHoldAtLeaderPosition</a>: Creates a menu to hold the escort at the client position.</li>
|
||||
<li><a href="##(ESCORT).MenuScanForTargets">ESCORT.MenuScanForTargets</a>: Creates a menu so that the escort scans targets.</li>
|
||||
<li><a href="##(ESCORT).MenuFlare">ESCORT.MenuFlare</a>: Creates a menu to disperse flares.</li>
|
||||
<li><a href="##(ESCORT).MenuSmoke">ESCORT.MenuSmoke</a>: Creates a menu to disparse smoke.</li>
|
||||
<li><a href="##(ESCORT).MenuReportTargets">ESCORT.MenuReportTargets</a>: Creates a menu so that the escort reports targets.</li>
|
||||
<li><a href="##(ESCORT).MenuReportPosition">ESCORT.MenuReportPosition</a>: Creates a menu so that the escort reports its current position from bullseye.</li>
|
||||
<li><a href="##(ESCORT).MenuAssistedAttack">ESCORT.MenuAssistedAttack</a>: Creates a menu structure so that the escort can resume from a waypoint.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
@@ -717,10 +723,7 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
<h2><a id="#(Distance)" >Type <code>Distance</code></a></h2>
|
||||
|
||||
<h2><a id="#(ESCORT)" >Type <code>ESCORT</code></a></h2>
|
||||
|
||||
<p>ESCORT class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
|
||||
1724
Documentation/Event.html
Normal file
1724
Documentation/Event.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li>GOHOMETASK</li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li>Group</li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -110,6 +101,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).CommandDoScript">GROUP:CommandDoScript(DoScript)</a></td>
|
||||
<td class="summary">
|
||||
<p>Do Script command</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).CommandSwitchWayPoint">GROUP:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)</a></td>
|
||||
<td class="summary">
|
||||
<p>Perform a switch waypoint command</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -206,7 +203,7 @@ Note that this destroy method also raises a destroy event at run-time.</p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetName">GROUP:GetName()</a></td>
|
||||
<td class="summary">
|
||||
<p>Gets the name of the GROUP.</p>
|
||||
<p>Returns the name of the Group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -459,12 +456,24 @@ Note that this destroy method also raises a destroy event at run-time.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).Route">GROUP:Route(GoPoints)</a></td>
|
||||
<td class="summary">
|
||||
<p>Make the group to follow a given route.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetCommand">GROUP:SetCommand(DCSCommand)</a></td>
|
||||
<td class="summary">
|
||||
<p>Executes a command action</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetTask">GROUP:SetTask(DCSTask, WaitTime)</a></td>
|
||||
<td class="summary">
|
||||
<p>Clearing the Task Queue and Setting the Task on the queue from the group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).TaskAttackGroup">GROUP:TaskAttackGroup(AttackGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Attack a Group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -748,6 +757,42 @@ All units on the ground result.</p>
|
||||
<p><em><a href="##(DCSCommand)">#DCSCommand</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).CommandSwitchWayPoint" >
|
||||
<strong>GROUP:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Perform a switch waypoint command</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number FromWayPoint </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number ToWayPoint </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Index </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTask.html##(Task)">DCSTask#Task</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1072,12 +1117,12 @@ Minimum height found.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Gets the name of the GROUP.</p>
|
||||
<p>Returns the name of the Group.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the GROUP.</p>
|
||||
GroupName</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1972,6 +2017,32 @@ self </p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetCommand" >
|
||||
<strong>GROUP:SetCommand(DCSCommand)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Executes a command action</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSCommand.html##(Command)">DCSCommand#Command</a> DCSCommand </em></code>: </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).SetTask" >
|
||||
<strong>GROUP:SetTask(DCSTask, WaitTime)</strong>
|
||||
</a>
|
||||
@@ -2003,6 +2074,33 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).TaskAttackGroup" >
|
||||
<strong>GROUP:TaskAttackGroup(AttackGroup)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Attack a Group.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Group.html##(GROUP)">Group#GROUP</a> AttackGroup </em></code>:
|
||||
The Group to be attacked.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="DCSTask.html##(Task)">DCSTask#Task</a>:</em>
|
||||
The DCS task structure.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).TaskAttackUnit" >
|
||||
<strong>GROUP:TaskAttackUnit(The, AttackUnit)</strong>
|
||||
</a>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li>MISSION</li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -387,6 +378,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).SchedulerId">MISSIONSCHEDULER.SchedulerId</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Scoring">MISSIONSCHEDULER:Scoring(Scoring)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a mission scoring to the game.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1522,6 +1519,27 @@ MISSIONSCHEDULER:RemoveMission( 'Russia Transport Troops SA-6' )</code></pre>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSIONSCHEDULER).Scoring" >
|
||||
<strong>MISSIONSCHEDULER:Scoring(Scoring)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a mission scoring to the game.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Scoring </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li>MOVEMENT</li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -94,13 +85,13 @@ on defined intervals (currently every minute).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnBirth">MOVEMENT:OnBirth(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnBirth">MOVEMENT:OnBirth(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Captures the birth events when new Units were spawned.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnDeadOrCrash">MOVEMENT:OnDeadOrCrash(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnDeadOrCrash">MOVEMENT:OnDeadOrCrash(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Captures the Dead or Crash events when Units crash or are destroyed.</p>
|
||||
</td>
|
||||
@@ -186,7 +177,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(MOVEMENT).OnBirth" >
|
||||
<strong>MOVEMENT:OnBirth(event)</strong>
|
||||
<strong>MOVEMENT:OnBirth(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -197,7 +188,7 @@ on defined intervals (currently every minute).</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -207,7 +198,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(MOVEMENT).OnDeadOrCrash" >
|
||||
<strong>MOVEMENT:OnDeadOrCrash(event)</strong>
|
||||
<strong>MOVEMENT:OnDeadOrCrash(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -218,7 +209,7 @@ on defined intervals (currently every minute).</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li>Menu</li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -88,6 +79,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="#MENU_CLIENT_COMMAND">MENU_CLIENT_COMMAND</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION">MENU_COALITION</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION_COMMAND">MENU_COALITION_COMMAND</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -205,6 +208,56 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).Remove">MENU_CLIENT_COMMAND:Remove()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(MENU_COALITION)">Type <code>MENU_COALITION</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).ClassName">MENU_COALITION.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).New">MENU_COALITION:New(MenuCoalition, MenuText, ParentMenu)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new coalition menu item</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).Remove">MENU_COALITION:Remove()</a></td>
|
||||
<td class="summary">
|
||||
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).RemoveSubMenus">MENU_COALITION:RemoveSubMenus()</a></td>
|
||||
<td class="summary">
|
||||
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(MENU_COALITION_COMMAND)">Type <code>MENU_COALITION_COMMAND</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION_COMMAND).ClassName">MENU_COALITION_COMMAND.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION_COMMAND).New">MENU_COALITION_COMMAND:New(MenuCoalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new radio command item for a group</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION_COMMAND).Remove">MENU_COALITION_COMMAND:Remove()</a></td>
|
||||
<td class="summary">
|
||||
<p>Removes a radio command item for a coalition</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -280,6 +333,34 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(MENU_COALITION)">#MENU_COALITION</a></em>
|
||||
<a id="MENU_COALITION" >
|
||||
<strong>MENU_COALITION</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(MENU_COALITION_COMMAND)">#MENU_COALITION_COMMAND</a></em>
|
||||
<a id="MENU_COALITION_COMMAND" >
|
||||
<strong>MENU_COALITION_COMMAND</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -642,6 +723,190 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(MENU_COALITION)" >Type <code>MENU_COALITION</code></a></h2>
|
||||
|
||||
<p>The MENU_COALITION class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(MENU_COALITION).ClassName" >
|
||||
<strong>MENU_COALITION.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MENU_COALITION).New" >
|
||||
<strong>MENU_COALITION:New(MenuCoalition, MenuText, ParentMenu)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new coalition menu item</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSCoalition.html##(coalition.side)">DCSCoalition#coalition.side</a> MenuCoalition </em></code>:
|
||||
The coalition owning the menu.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string MenuText </em></code>:
|
||||
The text for the menu.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table ParentMenu </em></code>:
|
||||
The parent menu.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MENU_COALITION)">#MENU_COALITION</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MENU_COALITION).Remove" >
|
||||
<strong>MENU_COALITION:Remove()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MENU_COALITION)">#MENU_COALITION</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MENU_COALITION).RemoveSubMenus" >
|
||||
<strong>MENU_COALITION:RemoveSubMenus()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MENU_COALITION)">#MENU_COALITION</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(MENU_COALITION_COMMAND)" >Type <code>MENU_COALITION_COMMAND</code></a></h2>
|
||||
|
||||
<p>The MENU<em>COALITION</em>COMMAND class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(MENU_COALITION_COMMAND).ClassName" >
|
||||
<strong>MENU_COALITION_COMMAND.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MENU_COALITION_COMMAND).New" >
|
||||
<strong>MENU_COALITION_COMMAND:New(MenuCoalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new radio command item for a group</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSCoalition.html##(coalition.side)">DCSCoalition#coalition.side</a> MenuCoalition </em></code>:
|
||||
The coalition owning the menu.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> MenuText </em></code>:
|
||||
The text for the menu.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ParentMenu </em></code>:
|
||||
The parent menu.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CommandMenuFunction </em></code>:
|
||||
A function that is called when the menu key is pressed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CommandMenuArgument </em></code>:
|
||||
An argument for the function.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MENU_COALITION_COMMAND)">#MENU<em>COALITION</em>COMMAND</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MENU_COALITION_COMMAND).Remove" >
|
||||
<strong>MENU_COALITION_COMMAND:Remove()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Removes a radio command item for a coalition</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MENU_COALITION_COMMAND)">#MENU<em>COALITION</em>COMMAND</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li>Message</li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
916
Documentation/MissileTrainer.html
Normal file
916
Documentation/MissileTrainer.html
Normal file
@@ -0,0 +1,916 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li>MissileTrainer</li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>MissileTrainer</code></h1>
|
||||
|
||||
<p>Provides missile training functions.</p>
|
||||
|
||||
|
||||
|
||||
<h1><a href="##(MISSILETRAINER)">#MISSILETRAINER</a> class</h1>
|
||||
<p>The <a href="##(MISSILETRAINER)">#MISSILETRAINER</a> class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft,
|
||||
the class will destroy the missile within a certain range, to avoid damage to your aircraft.
|
||||
It suports the following functionality:</p>
|
||||
|
||||
<ul>
|
||||
<li>Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.</li>
|
||||
<li>Provide alerts of missile launches, including detailed information of the units launching, including bearing, range …</li>
|
||||
<li>Provide alerts when a missile would have killed your aircraft.</li>
|
||||
<li>Provide alerts when the missile self destructs.</li>
|
||||
<li>Enable / Disable and Configure the Missile Trainer using the various menu options.</li>
|
||||
</ul>
|
||||
|
||||
<p> When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Messages</strong>: Menu to configure all messages.
|
||||
<ul>
|
||||
<li><strong>Messages On</strong>: Show all messages.</li>
|
||||
<li><strong>Messages Off</strong>: Disable all messages.</li>
|
||||
</ul></li>
|
||||
<li><strong>Tracking</strong>: Menu to configure missile tracking messages.
|
||||
<ul>
|
||||
<li><strong>To All</strong>: Shows missile tracking messages to all players.</li>
|
||||
<li><strong>To Target</strong>: Shows missile tracking messages only to the player where the missile is targetted at.</li>
|
||||
<li><strong>Tracking On</strong>: Show missile tracking messages.</li>
|
||||
<li><strong>Tracking Off</strong>: Disable missile tracking messages.</li>
|
||||
<li><strong>Frequency Increase</strong>: Increases the missile tracking message frequency with one second.</li>
|
||||
<li><strong>Frequency Decrease</strong>: Decreases the missile tracking message frequency with one second.</li>
|
||||
</ul></li>
|
||||
<li><strong>Alerts</strong>: Menu to configure alert messages.
|
||||
<ul>
|
||||
<li><strong>To All</strong>: Shows alert messages to all players.</li>
|
||||
<li><strong>To Target</strong>: Shows alter messages only to the player where the missile is (was) targetted at.</li>
|
||||
<li><strong>Hits On</strong>: Show missile hit alert messages.</li>
|
||||
<li><strong>Hits Off</strong>: Disable missile hit altert messages.</li>
|
||||
<li><strong>Launches On</strong>: Show missile launch messages.</li>
|
||||
<li><strong>Launches Off</strong>: Disable missile launch messages.</li>
|
||||
</ul></li>
|
||||
<li><strong>Details</strong>: Menu to configure message details.
|
||||
<ul>
|
||||
<li><strong>Range On</strong>: Shows range information when a missile is fired to a target.</li>
|
||||
<li><strong>Range Off</strong>: Disable range information when a missile is fired to a target.</li>
|
||||
<li><strong>Bearing On</strong>: Shows bearing information when a missile is fired to a target.</li>
|
||||
<li><strong>Bearing Off</strong>: Disable bearing information when a missile is fired to a target.</li>
|
||||
</ul></li>
|
||||
<li><strong>Distance</strong>: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured.
|
||||
<ul>
|
||||
<li><strong>50 meter</strong>: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.</li>
|
||||
<li><strong>100 meter</strong>: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.</li>
|
||||
<li><strong>150 meter</strong>: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.</li>
|
||||
<li><strong>200 meter</strong>: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>MISSILETRAINER construction methods:</h1>
|
||||
<p>Create a new MISSILETRAINER object with the <a href="##(MISSILETRAINER).New">MISSILETRAINER.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(MISSILETRAINER).New">MISSILETRAINER.New</a>: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.</li>
|
||||
</ul>
|
||||
|
||||
<p>MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.</p>
|
||||
|
||||
<h1>MISSILETRAINER initialization methods:</h1>
|
||||
<p>A MISSILETRAINER object will behave differently based on the usage of initialization methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(MISSILETRAINER).InitMessagesOnOff">MISSILETRAINER.InitMessagesOnOff</a>: Sets by default the display of any message to be ON or OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitTrackingToAll">MISSILETRAINER.InitTrackingToAll</a>: Sets by default the missile tracking report for all players or only for those missiles targetted to you.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitTrackingOnOff">MISSILETRAINER.InitTrackingOnOff</a>: Sets by default the display of missile tracking report to be ON or OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitTrackingFrequency">MISSILETRAINER.InitTrackingFrequency</a>: Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitAlertsToAll">MISSILETRAINER.InitAlertsToAll</a>: Sets by default the display of alerts to be shown to all players or only to you.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitAlertsHitsOnOff">MISSILETRAINER.InitAlertsHitsOnOff</a>: Sets by default the display of hit alerts ON or OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitAlertsLaunchesOnOff">MISSILETRAINER.InitAlertsLaunchesOnOff</a>: Sets by default the display of launch alerts ON or OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitRangeOnOff">MISSILETRAINER.InitRangeOnOff</a>: Sets by default the display of range information of missiles ON of OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitBearingOnOff">MISSILETRAINER.InitBearingOnOff</a>: Sets by default the display of bearing information of missiles ON of OFF.</li>
|
||||
<li><a href="##(MISSILETRAINER).InitMenusOnOff">MISSILETRAINER.InitMenusOnOff</a>: Allows to configure the options through the radio menu.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#MISSILETRAINER">MISSILETRAINER</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(MISSILETRAINER)">Type <code>MISSILETRAINER</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).AlertsHitsOnOff">MISSILETRAINER.AlertsHitsOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).AlertsLaunchesOnOff">MISSILETRAINER.AlertsLaunchesOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).AlertsToAll">MISSILETRAINER.AlertsToAll</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).ClassName">MISSILETRAINER.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).DetailsBearingOnOff">MISSILETRAINER.DetailsBearingOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).DetailsRangeOnOff">MISSILETRAINER.DetailsRangeOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitAlertsHitsOnOff">MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of hit alerts ON or OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitAlertsLaunchesOnOff">MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of launch alerts ON or OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitAlertsToAll">MISSILETRAINER:InitAlertsToAll(AlertsToAll)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of alerts to be shown to all players or only to you.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitBearingOnOff">MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of bearing information of missiles ON of OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitMenusOnOff">MISSILETRAINER:InitMenusOnOff(MenusOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Enables / Disables the menus.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitMessagesOnOff">MISSILETRAINER:InitMessagesOnOff(MessagesOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of any message to be ON or OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitRangeOnOff">MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of range information of missiles ON of OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitTrackingFrequency">MISSILETRAINER:InitTrackingFrequency(TrackingFrequency)</a></td>
|
||||
<td class="summary">
|
||||
<p>Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitTrackingOnOff">MISSILETRAINER:InitTrackingOnOff(TrackingOnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the display of missile tracking report to be ON or OFF.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).InitTrackingToAll">MISSILETRAINER:InitTrackingToAll(TrackingToAll)</a></td>
|
||||
<td class="summary">
|
||||
<p>Sets by default the missile tracking report for all players or only for those missiles targetted to you.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).MenusOnOff">MISSILETRAINER.MenusOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).MessagesOnOff">MISSILETRAINER.MessagesOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).New">MISSILETRAINER:New(Distance, Briefing)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates the main object which is handling missile tracking.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).TrackingFrequency">MISSILETRAINER.TrackingFrequency</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).TrackingOnOff">MISSILETRAINER.TrackingOnOff</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER).TrackingToAll">MISSILETRAINER.TrackingToAll</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._AddBearing">MISSILETRAINER:_AddBearing(Client, TrainerWeapon)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._AddRange">MISSILETRAINER:_AddRange(Client, TrainerWeapon)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._EventShot">MISSILETRAINER:_EventShot(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if an SA site was shot with an anti radiation missile.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._MenuMessages">MISSILETRAINER._MenuMessages(MenuParameters)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSILETRAINER)._TrackMissiles">MISSILETRAINER:_TrackMissiles()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a></em>
|
||||
<a id="MISSILETRAINER" >
|
||||
<strong>MISSILETRAINER</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(MissileTrainer)" >Type <code>MissileTrainer</code></a></h2>
|
||||
|
||||
<h2><a id="#(MISSILETRAINER)" >Type <code>MISSILETRAINER</code></a></h2>
|
||||
|
||||
<p>The MISSILETRAINER class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).AlertsHitsOnOff" >
|
||||
<strong>MISSILETRAINER.AlertsHitsOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).AlertsLaunchesOnOff" >
|
||||
<strong>MISSILETRAINER.AlertsLaunchesOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).AlertsToAll" >
|
||||
<strong>MISSILETRAINER.AlertsToAll</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(MISSILETRAINER).ClassName" >
|
||||
<strong>MISSILETRAINER.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).DetailsBearingOnOff" >
|
||||
<strong>MISSILETRAINER.DetailsBearingOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).DetailsRangeOnOff" >
|
||||
<strong>MISSILETRAINER.DetailsRangeOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitAlertsHitsOnOff" >
|
||||
<strong>MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of hit alerts ON or OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean AlertsHitsOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitAlertsLaunchesOnOff" >
|
||||
<strong>MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of launch alerts ON or OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean AlertsLaunchesOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitAlertsToAll" >
|
||||
<strong>MISSILETRAINER:InitAlertsToAll(AlertsToAll)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of alerts to be shown to all players or only to you.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean AlertsToAll </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitBearingOnOff" >
|
||||
<strong>MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of bearing information of missiles ON of OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean DetailsBearingOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitMenusOnOff" >
|
||||
<strong>MISSILETRAINER:InitMenusOnOff(MenusOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Enables / Disables the menus.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean MenusOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitMessagesOnOff" >
|
||||
<strong>MISSILETRAINER:InitMessagesOnOff(MessagesOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of any message to be ON or OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean MessagesOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitRangeOnOff" >
|
||||
<strong>MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of range information of missiles ON of OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean DetailsRangeOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitTrackingFrequency" >
|
||||
<strong>MISSILETRAINER:InitTrackingFrequency(TrackingFrequency)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.</p>
|
||||
|
||||
|
||||
<p>The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number TrackingFrequency </em></code>:
|
||||
Provide a negative or positive value in seconds to incraese or decrease the display frequency. </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitTrackingOnOff" >
|
||||
<strong>MISSILETRAINER:InitTrackingOnOff(TrackingOnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the display of missile tracking report to be ON or OFF.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean TrackingOnOff </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).InitTrackingToAll" >
|
||||
<strong>MISSILETRAINER:InitTrackingToAll(TrackingToAll)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Sets by default the missile tracking report for all players or only for those missiles targetted to you.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean TrackingToAll </em></code>:
|
||||
true or false</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).MenusOnOff" >
|
||||
<strong>MISSILETRAINER.MenusOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).MessagesOnOff" >
|
||||
<strong>MISSILETRAINER.MessagesOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).New" >
|
||||
<strong>MISSILETRAINER:New(Distance, Briefing)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates the main object which is handling missile tracking.</p>
|
||||
|
||||
|
||||
<p>When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Distance </em></code>:
|
||||
The distance in meters when a tracked missile needs to be destroyed when close to a player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Briefing </em></code>:
|
||||
(Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes. </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(MISSILETRAINER)">#MISSILETRAINER</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER).TrackingFrequency" >
|
||||
<strong>MISSILETRAINER.TrackingFrequency</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).TrackingOnOff" >
|
||||
<strong>MISSILETRAINER.TrackingOnOff</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(MISSILETRAINER).TrackingToAll" >
|
||||
<strong>MISSILETRAINER.TrackingToAll</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._AddBearing" >
|
||||
<strong>MISSILETRAINER:_AddBearing(Client, TrainerWeapon)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Client </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> TrainerWeapon </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._AddRange" >
|
||||
<strong>MISSILETRAINER:_AddRange(Client, TrainerWeapon)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Client </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> TrainerWeapon </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._EventShot" >
|
||||
<strong>MISSILETRAINER:_EventShot(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Detects if an SA site was shot with an anti radiation missile.</p>
|
||||
|
||||
|
||||
<p>In this case, take evasive actions based on the skill level set within the ME.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._MenuMessages" >
|
||||
<strong>MISSILETRAINER._MenuMessages(MenuParameters)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> MenuParameters </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSILETRAINER)._TrackMissiles" >
|
||||
<strong>MISSILETRAINER:_TrackMissiles()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li>NOTASK</li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li>PICKUPTASK</li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li>ROUTETASK</li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li>STAGE</li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
237
Documentation/Scheduler.html
Normal file
237
Documentation/Scheduler.html
Normal file
@@ -0,0 +1,237 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li>Scheduler</li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>Scheduler</code></h1>
|
||||
|
||||
<p>Models time events calling event handing functions.</p>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SCHEDULER">SCHEDULER</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(SCHEDULER)">Type <code>SCHEDULER</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).ClassName">SCHEDULER.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).New">SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</a></td>
|
||||
<td class="summary">
|
||||
<p>SCHEDULER constructor.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Scheduler">SCHEDULER:Scheduler()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Start">SCHEDULER:Start()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Stop">SCHEDULER:Stop()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SCHEDULER)">#SCHEDULER</a></em>
|
||||
<a id="SCHEDULER" >
|
||||
<strong>SCHEDULER</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(Scheduler)" >Type <code>Scheduler</code></a></h2>
|
||||
|
||||
<h2><a id="#(SCHEDULER)" >Type <code>SCHEDULER</code></a></h2>
|
||||
|
||||
<p>The SCHEDULER class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(SCHEDULER).ClassName" >
|
||||
<strong>SCHEDULER.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCHEDULER).New" >
|
||||
<strong>SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>SCHEDULER constructor.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table TimeEventObject </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function TimeEventFunction </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table TimeEventFunctionArguments </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number StartSeconds </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number RepeatSecondsInterval </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number RandomizationFactor </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number StopSeconds </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCHEDULER)">#SCHEDULER</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCHEDULER).Scheduler" >
|
||||
<strong>SCHEDULER:Scheduler()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCHEDULER).Start" >
|
||||
<strong>SCHEDULER:Start()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCHEDULER).Stop" >
|
||||
<strong>SCHEDULER:Stop()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
779
Documentation/Scoring.html
Normal file
779
Documentation/Scoring.html
Normal file
@@ -0,0 +1,779 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li>Scoring</li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>Scoring</code></h1>
|
||||
|
||||
<p>Scoring system for MOOSE.</p>
|
||||
|
||||
|
||||
<p>This scoring class calculates the hits and kills that players make within a simulation session.
|
||||
Scoring is calculated using a defined algorithm.
|
||||
With a small change in MissionScripting.lua, the scoring can also be logged in a CSV file, that can then be uploaded
|
||||
to a database or a BI tool to publish the scoring results to the player community.</p>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ClientGroup">ClientGroup</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SCORING">SCORING</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nHours">nHours</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nMins">nMins</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nSecs">nSecs</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(SCORING)">Type <code>SCORING</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).AllScoresMenu">SCORING.AllScoresMenu</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ClassID">SCORING.ClassID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ClassName">SCORING.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).CloseCSV">SCORING:CloseCSV()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).Menu">SCORING.Menu</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).New">SCORING:New(GameName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SCORING object to administer the scoring achieved by players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).OpenCSV">SCORING:OpenCSV(ScoringCSV)</a></td>
|
||||
<td class="summary">
|
||||
<p>Opens a score CSV file to log the scores.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).Players">SCORING.Players</a></td>
|
||||
<td class="summary">
|
||||
<p>A collection of the current players that have joined the game.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ReportScoreAll">SCORING:ReportScoreAll()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ReportScorePlayer">SCORING:ReportScorePlayer()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).RunTime">SCORING.RunTime</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoreCSV">SCORING:ScoreCSV(PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers a score for a player.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoreMenu">SCORING:ScoreMenu()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a score radio menu.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoringCSV">SCORING.ScoringCSV</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).SecondsToClock">SCORING:SecondsToClock(sSeconds)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddMissionScore">SCORING:_AddMissionScore(MissionName, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers Mission Scores for possible multiple players that contributed in the Mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddMissionTaskScore">SCORING:_AddMissionTaskScore(PlayerUnit, MissionName, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers Scores the players completing a Mission Task.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddPlayerFromUnit">SCORING:_AddPlayerFromUnit(UnitData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a new player entering a Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._EventOnDeadOrCrash">SCORING:_EventOnDeadOrCrash(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Track DEAD or CRASH events for the scoring.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._EventOnHit">SCORING:_EventOnHit(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnHit event for the scoring.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._FollowPlayersScheduled">SCORING:_FollowPlayersScheduled()</a></td>
|
||||
<td class="summary">
|
||||
<p>Follows new players entering Clients within the DCSRTE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="ClientGroup" >
|
||||
<strong>ClientGroup</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SCORING)">#SCORING</a></em>
|
||||
<a id="SCORING" >
|
||||
<strong>SCORING</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nHours" >
|
||||
<strong>nHours</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nMins" >
|
||||
<strong>nMins</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nSecs" >
|
||||
<strong>nSecs</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(Scoring)" >Type <code>Scoring</code></a></h2>
|
||||
|
||||
<h2><a id="#(SCORING)" >Type <code>SCORING</code></a></h2>
|
||||
|
||||
<p>The Scoring class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).AllScoresMenu" >
|
||||
<strong>SCORING.AllScoresMenu</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SCORING).ClassID" >
|
||||
<strong>SCORING.ClassID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(SCORING).ClassName" >
|
||||
<strong>SCORING.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).CloseCSV" >
|
||||
<strong>SCORING:CloseCSV()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).Menu" >
|
||||
<strong>SCORING.Menu</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).New" >
|
||||
<strong>SCORING:New(GameName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new SCORING object to administer the scoring achieved by players.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string GameName </em></code>:
|
||||
The name of the game. This name is also logged in the CSV score file.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Define a new scoring object for the mission Gori Valley.
|
||||
ScoringObject = SCORING:New( "Gori Valley" )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).OpenCSV" >
|
||||
<strong>SCORING:OpenCSV(ScoringCSV)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Opens a score CSV file to log the scores.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoringCSV </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
|
||||
ScoringObject = SCORING:New( "Gori Valley" )
|
||||
ScoringObject:OpenCSV( "Player Scores" )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).Players" >
|
||||
<strong>SCORING.Players</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>A collection of the current players that have joined the game.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ReportScoreAll" >
|
||||
<strong>SCORING:ReportScoreAll()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ReportScorePlayer" >
|
||||
<strong>SCORING:ReportScorePlayer()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).RunTime" >
|
||||
<strong>SCORING.RunTime</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ScoreCSV" >
|
||||
<strong>SCORING:ScoreCSV(PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers a score for a player.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerName </em></code>:
|
||||
The name of the player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreType </em></code>:
|
||||
The type of the score.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreTimes </em></code>:
|
||||
The amount of scores achieved.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreAmount </em></code>:
|
||||
The score given.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitName </em></code>:
|
||||
The unit name of the player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitCoalition </em></code>:
|
||||
The coalition of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitCategory </em></code>:
|
||||
The category of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitType </em></code>:
|
||||
The type of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitName </em></code>:
|
||||
The name of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitCoalition </em></code>:
|
||||
The coalition of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitCategory </em></code>:
|
||||
The category of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitType </em></code>:
|
||||
The type of the target unit.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ScoreMenu" >
|
||||
<strong>SCORING:ScoreMenu()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a score radio menu.</p>
|
||||
|
||||
|
||||
<p>Can be accessed using Radio -> F10.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).ScoringCSV" >
|
||||
<strong>SCORING.ScoringCSV</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).SecondsToClock" >
|
||||
<strong>SCORING:SecondsToClock(sSeconds)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> sSeconds </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddMissionScore" >
|
||||
<strong>SCORING:_AddMissionScore(MissionName, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers Mission Scores for possible multiple players that contributed in the Mission.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> MissionName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Score </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddMissionTaskScore" >
|
||||
<strong>SCORING:_AddMissionTaskScore(PlayerUnit, MissionName, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers Scores the players completing a Mission Task.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> PlayerUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> MissionName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Score </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddPlayerFromUnit" >
|
||||
<strong>SCORING:_AddPlayerFromUnit(UnitData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add a new player entering a Unit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> UnitData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._EventOnDeadOrCrash" >
|
||||
<strong>SCORING:_EventOnDeadOrCrash(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Track DEAD or CRASH events for the scoring.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._EventOnHit" >
|
||||
<strong>SCORING:_EventOnHit(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnHit event for the scoring.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._FollowPlayersScheduled" >
|
||||
<strong>SCORING:_FollowPlayersScheduled()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Follows new players entering Clients within the DCSRTE.</p>
|
||||
|
||||
|
||||
<p>TODO: Need to see if i can catch this also with an event. It will eliminate the schedule ...</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li>Sead</li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -82,7 +73,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SEAD).EventShot">SEAD:EventShot(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SEAD).EventShot">SEAD:EventShot(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if an SA site was shot with an anti radiation missile.</p>
|
||||
</td>
|
||||
@@ -147,7 +138,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(SEAD).EventShot" >
|
||||
<strong>SEAD:EventShot(event)</strong>
|
||||
<strong>SEAD:EventShot(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -161,7 +152,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li>Spawn</li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -65,7 +56,9 @@
|
||||
<p>Dynamic spawning of groups (and units).</p>
|
||||
|
||||
|
||||
<p>The SPAWN class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
|
||||
<h1><a href="##(SPAWN)">#SPAWN</a> class</h1>
|
||||
<p>The <a href="##(SPAWN)">#SPAWN</a> class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the <em>"Spawn Template"</em> of the SPAWN object.
|
||||
A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods.</p>
|
||||
|
||||
@@ -86,53 +79,60 @@ Groups will follow the following naming structure when spawned at run-time:</p>
|
||||
<p>Some additional notes that need to be remembered:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</p></li>
|
||||
<li><p>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</p></li>
|
||||
<li><p>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</p></li>
|
||||
<li><h2>SPAWN object construction methods:</h2>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</p></li>
|
||||
<li>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</li>
|
||||
<li>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</li>
|
||||
<li>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN construction methods:</h1>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</li>
|
||||
</ul>
|
||||
|
||||
<p>It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned.
|
||||
The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
|
||||
So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.</p>
|
||||
|
||||
<ol>
|
||||
<li><h2>SPAWN object initialization methods: </h2>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p></li>
|
||||
<li><p><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </p></li>
|
||||
<li><p><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</p></li>
|
||||
<li><p><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</p></li>
|
||||
<li><p><a href="##(SPAWN).Repeat">SPAWN.Repeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a> and <a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a>.</p></li>
|
||||
<li><h2>SPAWN object spawning methods:</h2>
|
||||
<p>Groups can be spawned at different times and methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</p></li>
|
||||
<li><p><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</p></li>
|
||||
</ol>
|
||||
<h1>SPAWN initialization methods: </h1>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</li>
|
||||
<li><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</li>
|
||||
<li><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </li>
|
||||
<li><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</li>
|
||||
<li><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
|
||||
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a> and <a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN spawning methods:</h1>
|
||||
<p>Groups can be spawned at different times and methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</li>
|
||||
<li><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</li>
|
||||
<li><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</li>
|
||||
<li><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</li>
|
||||
<li><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that <a href="##(SPAWN).Spawn">SPAWN.Spawn</a> and <a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a> return a <a href="GROUP.html##(GROUP).New">GROUP#GROUP.New</a> object, that contains a reference to the DCSGroup object.
|
||||
You can use the <a href="GROUP.html">GROUP</a> object to do further actions with the DCSGroup.</p>
|
||||
|
||||
<ol>
|
||||
<li>SPAWN object cleaning:
|
||||
<hr/>
|
||||
Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> initialization method has been defined that will silently monitor the status of each spawned group.
|
||||
Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time.
|
||||
There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"...
|
||||
In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically.
|
||||
This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</li>
|
||||
</ol>
|
||||
<h1>SPAWN object cleaning:</h1>
|
||||
<p>Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> initialization method has been defined that will silently monitor the status of each spawned group.
|
||||
Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time.
|
||||
There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"...
|
||||
In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically.
|
||||
This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -146,12 +146,6 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<h2><a id="#(SPAWN)">Type <code>SPAWN</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AliveFactor">SPAWN.AliveFactor</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).Array">SPAWN:Array(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</a></td>
|
||||
<td class="summary">
|
||||
<p>Makes the groups visible before start (like a batallion).</p>
|
||||
@@ -170,7 +164,7 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).CleanUpFunction">SPAWN.CleanUpFunction</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).CleanUpScheduler">SPAWN.CleanUpScheduler</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@@ -203,6 +197,24 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetSpawnIndexFromGroup">SPAWN:GetSpawnIndexFromGroup(SpawnGroup)</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the index from a given group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeat">SPAWN:InitRepeat()</a></td>
|
||||
<td class="summary">
|
||||
<p>For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN:InitRepeatOnEngineShutDown()</a></td>
|
||||
<td class="summary">
|
||||
<p>Respawn after landing when its engines have shut down.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeatOnLanding">SPAWN:InitRepeatOnLanding()</a></td>
|
||||
<td class="summary">
|
||||
<p>Respawn group after landing.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -242,9 +254,9 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).Repeat">SPAWN:Repeat()</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).Repeat">SPAWN.Repeat</a></td>
|
||||
<td class="summary">
|
||||
<p>For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -281,12 +293,6 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnCleanUpTimeStamps">SPAWN.SpawnCleanUpTimeStamps</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnCurrentTimer">SPAWN.SpawnCurrentTimer</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -320,21 +326,9 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnHighTimer">SPAWN.SpawnHighTimer</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInZone">SPAWN:SpawnInZone(Zone, ZoneRandomize, SpawnIndex)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInZone">SPAWN:SpawnInZone(Zone, SpawnIndex)</a></td>
|
||||
<td class="summary">
|
||||
<p>Will spawn a Group within a given <a href="ZONE.html">ZONE</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnLowTimer">SPAWN.SpawnLowTimer</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Will spawn a Group within a given <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -377,18 +371,12 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeTemplate">SPAWN.SpawnRandomizeTemplate</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRepeat">SPAWN.SpawnRepeat</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduleStart">SPAWN:SpawnScheduleStart()</a></td>
|
||||
<td class="summary">
|
||||
<p>Will start the spawning scheduler.</p>
|
||||
<p>Will re-start the spawning scheduler.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -404,7 +392,7 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnSetTimer">SPAWN.SpawnSetTimer</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduler">SPAWN.SpawnScheduler</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
@@ -538,13 +526,13 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._RandomizeRoute">SPAWN:_RandomizeRoute(SpawnIndex)</a></td>
|
||||
<td class="summary">
|
||||
<p>Internal function randomizing the routes.</p>
|
||||
<p>Private method randomizing the routes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._RandomizeTemplate">SPAWN:_RandomizeTemplate(SpawnIndex)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Private method that randomizes the template of the group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -592,20 +580,6 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).AliveFactor" >
|
||||
<strong>SPAWN.AliveFactor</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).Array" >
|
||||
<strong>SPAWN:Array(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</strong>
|
||||
</a>
|
||||
@@ -709,14 +683,17 @@ self</p>
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).CleanUpFunction" >
|
||||
<strong>SPAWN.CleanUpFunction</strong>
|
||||
<a id="#(SPAWN).CleanUpScheduler" >
|
||||
<strong>SPAWN.CleanUpScheduler</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -864,6 +841,71 @@ When no group is found, #nil is returned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitRepeat" >
|
||||
<strong>SPAWN:InitRepeat()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.</p>
|
||||
|
||||
|
||||
<p>This function is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed.
|
||||
This will enable a spawned group to be re-spawned after it lands, until it is destroyed...
|
||||
Note: When the group is respawned, it will re-spawn from the original airbase where it took off.
|
||||
So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- RU Su-34 - AI Ship Attack
|
||||
-- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
|
||||
SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitRepeatOnEngineShutDown" >
|
||||
<strong>SPAWN:InitRepeatOnEngineShutDown()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Respawn after landing when its engines have shut down.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).InitRepeatOnLanding" >
|
||||
<strong>SPAWN:InitRepeatOnLanding()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Respawn group after landing.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).Limit" >
|
||||
<strong>SPAWN:Limit(SpawnMaxUnitsAlive, SpawnMaxGroups)</strong>
|
||||
</a>
|
||||
@@ -1111,29 +1153,14 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).Repeat" >
|
||||
<strong>SPAWN:Repeat()</strong>
|
||||
<strong>SPAWN.Repeat</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.</p>
|
||||
|
||||
|
||||
<p>This function is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed.
|
||||
This will enable a spawned group to be re-spawned after it lands, until it is destroyed...
|
||||
Note: When the group is respawned, it will re-spawn from the original airbase where it took off.
|
||||
So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- RU Su-34 - AI Ship Attack
|
||||
-- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
|
||||
SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1226,23 +1253,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnCurrentTimer" >
|
||||
<strong>SPAWN.SpawnCurrentTimer</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> The internal timer counter to trigger a scheduled spawning of SpawnTemplatePrefix.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1400,43 +1410,39 @@ Is the number of the Group that is to be spawned.</p>
|
||||
<p><em>#string:</em>
|
||||
SpawnGroupName</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnHighTimer" >
|
||||
<strong>SPAWN.SpawnHighTimer</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).SpawnInZone" >
|
||||
<strong>SPAWN:SpawnInZone(Zone, SpawnIndex)</strong>
|
||||
<strong>SPAWN:SpawnInZone(Zone, ZoneRandomize, SpawnIndex)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Will spawn a Group within a given <a href="ZONE.html">ZONE</a>.</p>
|
||||
<p>Will spawn a Group within a given <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</p>
|
||||
|
||||
|
||||
<p>Once the group is spawned within the zone, it will continue on its route.
|
||||
The first waypoint (where the group is spawned) is replaced with the zone coordinates.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(ZONE)">#ZONE</a> Zone </em></code>:
|
||||
<p><code><em><a href="Zone.html##(ZONE)">Zone#ZONE</a> Zone </em></code>:
|
||||
The zone where the group is to be spawned.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number ZoneRandomize </em></code>:
|
||||
(Optional) Set to true if you want to randomize the starting point in the zone.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number SpawnIndex </em></code>:
|
||||
(Optional) The index which group to spawn within the given zone.</p>
|
||||
|
||||
@@ -1457,20 +1463,6 @@ when nothing was spawned.</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnLowTimer" >
|
||||
<strong>SPAWN.SpawnLowTimer</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1575,20 +1567,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).SpawnRepeat" >
|
||||
<strong>SPAWN.SpawnRepeat</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -1600,10 +1578,10 @@ when nothing was spawned.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Will start the spawning scheduler.</p>
|
||||
<p>Will re-start the spawning scheduler.</p>
|
||||
|
||||
|
||||
<p>Note: This function is called automatically when <a href="##(SPAWN).Scheduled">SPAWN.Scheduled</a> is called.</p>
|
||||
<p>Note: This function is only required to be called when the schedule was stopped.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1670,18 +1648,15 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWN).SpawnSetTimer" >
|
||||
<strong>SPAWN.SpawnSetTimer</strong>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnScheduler" >
|
||||
<strong>SPAWN.SpawnScheduler</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> The internal timer value when a scheduled spawning of SpawnTemplatePrefix occurs.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2000,10 +1975,15 @@ Nothing found</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnTemplatePrefix </em></code>: </p>
|
||||
<p><code><em>#string SpawnTemplatePrefix </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>@SPAWN self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2039,7 +2019,7 @@ Nothing found</p>
|
||||
|
||||
|
||||
|
||||
<p> TODO Need to delete this... _Database does this now ...</p>
|
||||
<p> TODO Need to delete this... _DATABASE does this now ...</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@@ -2162,15 +2142,20 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.</p
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnTemplatePrefix </em></code>: </p>
|
||||
<p><code><em>#string SpawnTemplatePrefix </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnIndex </em></code>: </p>
|
||||
<p><code><em>#number SpawnIndex </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2182,7 +2167,7 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.</p
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Internal function randomizing the routes.</p>
|
||||
<p>Private method randomizing the routes.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@@ -2209,16 +2194,21 @@ The index of the group to be spawned.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<p>Private method that randomizes the template of the group.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnIndex </em></code>: </p>
|
||||
<p><code><em>#number SpawnIndex </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@@ -2297,8 +2287,6 @@ The index of the group to be spawned.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE)" >Type <code>ZONE</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li>StaticObject</li>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li>TASK</li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -217,7 +208,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK).Goal">TASK.Goal(?, self, GoalVerb)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK).Goal">TASK:Goal(GoalVerb)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a TASK has Goal(s).</p>
|
||||
</td>
|
||||
@@ -1147,29 +1138,19 @@ tring GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK).Goal" >
|
||||
<strong>TASK.Goal(?, self, GoalVerb)</strong>
|
||||
<strong>TASK:Goal(GoalVerb)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a TASK has Goal(s).</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
tring GoalVerb is the name of the Goal of the TASK.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> GoalVerb </em></code>: </p>
|
||||
<p><code><em>#string GoalVerb </em></code>:
|
||||
is the name of the Goal of the TASK.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li>Unit</li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -151,6 +142,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetName">UNIT:GetName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPlayerName">UNIT:GetPlayerName()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -507,6 +504,19 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(UNIT).GetPlayerName" >
|
||||
<strong>UNIT:GetPlayerName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li>Zone</li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -85,6 +76,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE).GetPointVec2">ZONE:GetPointVec2()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE).GetPointVec3">ZONE:GetPointVec3(Height)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -154,6 +151,27 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE).GetPointVec3" >
|
||||
<strong>ZONE:GetPointVec3(Height)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Height </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -65,7 +56,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Base.html">Base</a></td>
|
||||
<td class="summary">
|
||||
<p>The BASE class for all the classes defined within MOOSE.</p>
|
||||
<p>BASE classes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -84,66 +75,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="Client.html">Client</a></td>
|
||||
<td class="summary">
|
||||
<p>The CLIENT models client units in multi player missions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSAirbase.html">DCSAirbase</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSCommand.html">DCSCommand</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSController.html">DCSController</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSGroup.html">DCSGroup</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSObject.html">DCSObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSTask.html">DCSTask</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSTypes.html">DCSTypes</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSUnit.html">DCSUnit</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCStimer.html">DCStimer</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -179,13 +110,19 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Database.html">Database</a></td>
|
||||
<td class="summary">
|
||||
<p>Administers the Initial Sets of the Mission Templates as defined within the Mission Editor.</p>
|
||||
<p>Manage sets of units and groups.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Escort.html">Escort</a></td>
|
||||
<td class="summary">
|
||||
<p>Taking the lead of AI escorting your flight.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Event.html">Event</a></td>
|
||||
<td class="summary">
|
||||
<p>The EVENT class models an efficient event handling process between other classes and its units, weapons.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -222,6 +159,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="Message.html">Message</a></td>
|
||||
<td class="summary">
|
||||
<p>Message System to display Messages for Clients and Coalitions or All.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="MissileTrainer.html">MissileTrainer</a></td>
|
||||
<td class="summary">
|
||||
<p>Provides missile training functions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -246,6 +189,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="STAGE.html">STAGE</a></td>
|
||||
<td class="summary">
|
||||
<p>Stages within a <a href="TASK.html">TASK</a> within a <a href="MISSION.html">MISSION</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Scheduler.html">Scheduler</a></td>
|
||||
<td class="summary">
|
||||
<p>Models time events calling event handing functions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Scoring.html">Scoring</a></td>
|
||||
<td class="summary">
|
||||
<p>Scoring system for MOOSE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -258,12 +213,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="Spawn.html">Spawn</a></td>
|
||||
<td class="summary">
|
||||
<p>Dynamic spawning of groups (and units).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="StaticObject.html">StaticObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -282,18 +231,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="Zone.html">Zone</a></td>
|
||||
<td class="summary">
|
||||
<p>ZONE Classes</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="env.html">env</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="land.html">land</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -21,16 +21,6 @@
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
@@ -38,24 +28,25 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li>routines</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
rem Generate Moose_Embedded.lua
|
||||
del Moose_Embedded.lua
|
||||
|
||||
copy /b ..\Moose\Routines.lua ^
|
||||
+ ..\Moose\Base.lua ^
|
||||
+ ..\Moose\Menu.lua ^
|
||||
+ ..\Moose\Group.lua ^
|
||||
+ ..\Moose\Unit.lua ^
|
||||
+ ..\Moose\Zone.lua ^
|
||||
+ ..\Moose\Database.lua ^
|
||||
+ ..\Moose\Cargo.lua ^
|
||||
+ ..\Moose\Client.lua ^
|
||||
+ ..\Moose\Message.lua ^
|
||||
+ ..\Moose\Stage.lua ^
|
||||
+ ..\Moose\Task.lua ^
|
||||
+ ..\Moose\GoHomeTask.lua ^
|
||||
+ ..\Moose\DestroyBaseTask.lua ^
|
||||
+ ..\Moose\DestroyGroupsTask.lua ^
|
||||
+ ..\Moose\DestroyRadarsTask.lua ^
|
||||
+ ..\Moose\DestroyUnitTypesTask.lua ^
|
||||
+ ..\Moose\PickupTask.lua ^
|
||||
+ ..\Moose\DeployTask.lua ^
|
||||
+ ..\Moose\NoTask.lua ^
|
||||
+ ..\Moose\RouteTask.lua ^
|
||||
+ ..\Moose\Mission.lua ^
|
||||
+ ..\Moose\CleanUp.lua ^
|
||||
+ ..\Moose\Spawn.lua ^
|
||||
+ ..\Moose\Movement.lua ^
|
||||
+ ..\Moose\Sead.lua ^
|
||||
+ ..\Moose\Escort.lua ^
|
||||
Moose_Embedded.lua /y
|
||||
|
||||
echo env.info( 'Moose Embedded' ) > Moose_Embedded.lua
|
||||
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Routines.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Base.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Event.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Menu.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Group.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Unit.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Zone.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Client.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Database.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Moose.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Scheduler.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Scoring.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Cargo.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Message.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Stage.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Task.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\GoHomeTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyBaseTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyGroupsTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyRadarsTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyUnitTypesTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\PickupTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DeployTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\NoTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\RouteTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Mission.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\CleanUp.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Spawn.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Movement.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Sead.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Escort.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\MissileTrainer.lua Moose_Embedded.lua
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,31 +0,0 @@
|
||||
rem Generate Moose_Embedded.lua
|
||||
|
||||
copy Trace.lua ^
|
||||
+ Routines.lua ^
|
||||
+ Base.lua ^
|
||||
+ Menu.lua ^
|
||||
+ Group.lua ^
|
||||
+ Unit.lua ^
|
||||
+ Zone.lua ^
|
||||
+ Database.lua ^
|
||||
+ Cargo.lua ^
|
||||
+ Client.lua ^
|
||||
+ Message.lua ^
|
||||
+ Stage.lua ^
|
||||
+ Task.lua ^
|
||||
+ GoHomeTask.lua ^
|
||||
+ DestroyBaseTask.lua ^
|
||||
+ DestroyGroupsTask.lua ^
|
||||
+ DestroyRadarsTask.lua ^
|
||||
+ DestroyUnitTypesTask.lua ^
|
||||
+ PickupTask.lua ^
|
||||
+ DeployTask.lua ^
|
||||
+ NoTask.lua ^
|
||||
+ RouteTask.lua ^
|
||||
+ Mission.lua ^
|
||||
+ CleanUp.lua ^
|
||||
+ Spawn.lua ^
|
||||
+ Movement.lua ^
|
||||
+ Sead.lua ^
|
||||
Moose_Embedded.lua
|
||||
|
||||
@@ -38,6 +38,6 @@ env.info( "Include.MissionPath = " .. Include.MissionPath)
|
||||
|
||||
Include.Files = {}
|
||||
|
||||
Include.File( "Database" )
|
||||
Include.File( "Moose" )
|
||||
|
||||
env.info("Loaded MOOSE Include Engine")
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
local base = _G
|
||||
env.info("Loading MOOSE " .. base.timer.getAbsTime() )
|
||||
|
||||
@@ -20,4 +19,6 @@ env.info( "Include.MissionPath = " .. Include.MissionPath)
|
||||
|
||||
Include.Files = {}
|
||||
|
||||
Include.File( "Moose" )
|
||||
|
||||
env.info("Loaded MOOSE Include Engine")
|
||||
|
||||
BIN
Maths/Bearing calculation.ggb
Normal file
BIN
Maths/Bearing calculation.ggb
Normal file
Binary file not shown.
@@ -1,4 +1,55 @@
|
||||
--- The BASE class for all the classes defined within MOOSE.
|
||||
--- BASE classes.
|
||||
--
|
||||
-- @{#BASE} class
|
||||
-- ==============
|
||||
-- The @{#BASE} class is the super class for most of the classes defined within MOOSE.
|
||||
--
|
||||
-- It handles:
|
||||
--
|
||||
-- * The construction and inheritance of child classes.
|
||||
-- * The tracing of objects during mission execution within the DCS.log file (under saved games folder).
|
||||
--
|
||||
-- Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.
|
||||
--
|
||||
-- BASE Trace functionality
|
||||
-- ========================
|
||||
-- The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
-- Note that these trace methods are inherited by each MOOSE class interiting BASE.
|
||||
-- As such, each object created from derived class from BASE can use the tracing functions to trace its execution.
|
||||
--
|
||||
-- Trace a function call
|
||||
-- ---------------------
|
||||
-- There are basically 3 types of tracing methods available within BASE:
|
||||
--
|
||||
-- * @{#BASE.F}: Trace the beginning of a function and its given parameters.
|
||||
-- * @{#BASE.T}: Trace further logic within a function giving optional variables or parameters.
|
||||
-- * @{#BASE.E}: Trace an execption within a function giving optional variables or parameters. An exception will always be traced.
|
||||
--
|
||||
-- Tracing levels
|
||||
-- --------------
|
||||
-- There are 3 tracing levels within MOOSE.
|
||||
-- These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.
|
||||
--
|
||||
-- As such, the F and T methods have additional variants to trace level 2 and 3 respectively:
|
||||
--
|
||||
-- * @{#BASE.F2}: Trace the beginning of a function and its given parameters with tracing level 2.
|
||||
-- * @{#BASE.F3}: Trace the beginning of a function and its given parameters with tracing level 3.
|
||||
-- * @{#BASE.T2}: Trace further logic within a function giving optional variables or parameters with tracing level 2.
|
||||
-- * @{#BASE.T3}: Trace further logic within a function giving optional variables or parameters with tracing level 3.
|
||||
--
|
||||
-- BASE Inheritance support
|
||||
-- ========================
|
||||
-- The following methods are available to support inheritance:
|
||||
--
|
||||
-- * @{#BASE.Inherit}: Inherits from a class.
|
||||
-- * @{#BASE.Inherited}: Returns the parent class from the class.
|
||||
--
|
||||
-- Future
|
||||
-- ======
|
||||
-- Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- @module Base
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -46,6 +97,8 @@ FORMATION = {
|
||||
Cone = "Cone"
|
||||
}
|
||||
|
||||
|
||||
|
||||
--- The base constructor. This is the top top class of all classed defined within the MOOSE.
|
||||
-- Any new class needs to be derived from this class for proper inheritance.
|
||||
-- @param #BASE self
|
||||
@@ -140,6 +193,18 @@ function BASE:AddEvent( Event, EventFunction )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Returns the event dispatcher
|
||||
-- @param #BASE self
|
||||
-- @return Event#EVENT
|
||||
function BASE:Event()
|
||||
|
||||
return _EVENTDISPATCHER
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Enable the event listeners for the class.
|
||||
-- @param #BASE self
|
||||
-- @return #BASE
|
||||
@@ -253,8 +318,8 @@ end
|
||||
-- @param #BASE self
|
||||
-- @param DCSTypes#Event event
|
||||
function BASE:onEvent(event)
|
||||
--self:F( { BaseEventCodes[event.id], event } )
|
||||
|
||||
--env.info( 'onEvent Table self = ' .. tostring(self) )
|
||||
if self then
|
||||
for EventID, EventObject in pairs( self.Events ) do
|
||||
if EventObject.EventEnabled then
|
||||
@@ -269,8 +334,8 @@ function BASE:onEvent(event)
|
||||
if event.target and event.target:isExist() then
|
||||
event.TgtUnitName = event.target:getName()
|
||||
end
|
||||
self:T( { BaseEventCodes[event.id], event } )
|
||||
EventObject.EventFunction( self, event )
|
||||
--self:T( { BaseEventCodes[event.id], event } )
|
||||
--EventObject.EventFunction( self, event )
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -288,6 +353,7 @@ end
|
||||
-- @param #number Level
|
||||
function BASE:TraceLevel( Level )
|
||||
_TraceLevel = Level
|
||||
self:E( "Tracing level " .. Level )
|
||||
end
|
||||
|
||||
--- Set tracing for a class
|
||||
@@ -296,6 +362,7 @@ end
|
||||
function BASE:TraceClass( Class )
|
||||
_TraceClass[Class] = true
|
||||
_TraceClassMethod[Class] = {}
|
||||
self:E( "Tracing class " .. Class )
|
||||
end
|
||||
|
||||
--- Set tracing for a specific method of class
|
||||
@@ -308,6 +375,7 @@ function BASE:TraceClassMethod( Class, Method )
|
||||
_TraceClassMethod[Class].Method = {}
|
||||
end
|
||||
_TraceClassMethod[Class].Method[Method] = true
|
||||
self:E( "Tracing method " .. Method .. " of class " .. Class )
|
||||
end
|
||||
|
||||
--- Trace a function call. Must be at the beginning of the function logic.
|
||||
|
||||
247
Moose/Cargo.lua
247
Moose/Cargo.lua
@@ -31,18 +31,31 @@ CARGO_ZONE = {
|
||||
}
|
||||
}
|
||||
|
||||
function CARGO_ZONE:New( CargoZoneName, CargoHostName ) local self = BASE:Inherit( self, BASE:New() )
|
||||
--- Creates a new zone where cargo can be collected or deployed.
|
||||
-- The zone functionality is useful to smoke or indicate routes for cargo pickups or deployments.
|
||||
-- Provide the zone name as declared in the mission file into the CargoZoneName in the :New method.
|
||||
-- An optional parameter is the CargoHostName, which is a Group declared with Late Activation switched on in the mission file.
|
||||
-- The CargoHostName is the "host" of the cargo zone:
|
||||
--
|
||||
-- * It will smoke the zone position when a client is approaching the zone.
|
||||
-- * Depending on the cargo type, it will assist in the delivery of the cargo by driving to and from the client.
|
||||
--
|
||||
-- @param #CARGO_ZONE self
|
||||
-- @param #string CargoZoneName The name of the zone as declared within the mission editor.
|
||||
-- @param #string CargoHostName The name of the Group "hosting" the zone. The Group MUST NOT be a static, and must be a "mobile" unit.
|
||||
function CARGO_ZONE:New( CargoZoneName, CargoHostName ) local self = BASE:Inherit( self, ZONE:New( CargoZoneName ) )
|
||||
self:F( { CargoZoneName, CargoHostName } )
|
||||
|
||||
self.CargoZoneName = CargoZoneName
|
||||
self.CargoZone = trigger.misc.getZone( CargoZoneName )
|
||||
self.SignalHeight = 2
|
||||
--self.CargoZone = trigger.misc.getZone( CargoZoneName )
|
||||
|
||||
|
||||
if CargoHostName then
|
||||
self.CargoHostName = CargoHostName
|
||||
end
|
||||
|
||||
self:T( self.CargoZone )
|
||||
self:T( self.CargoZoneName )
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -50,17 +63,19 @@ end
|
||||
function CARGO_ZONE:Spawn()
|
||||
self:F( self.CargoHostName )
|
||||
|
||||
if self.CargoHostSpawn then
|
||||
local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex()
|
||||
if CargoHostGroup and CargoHostGroup:IsAlive() then
|
||||
else
|
||||
self.CargoHostSpawn:ReSpawn( 1 )
|
||||
end
|
||||
else
|
||||
self:T( "Initialize CargoHostSpawn" )
|
||||
self.CargoHostSpawn = SPAWN:New( self.CargoHostName ):Limit( 1, 1 )
|
||||
self.CargoHostSpawn:ReSpawn( 1 )
|
||||
end
|
||||
if self.CargoHostName then -- Only spawn a host in the zone when there is one given as a parameter in the New function.
|
||||
if self.CargoHostSpawn then
|
||||
local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex()
|
||||
if CargoHostGroup and CargoHostGroup:IsAlive() then
|
||||
else
|
||||
self.CargoHostSpawn:ReSpawn( 1 )
|
||||
end
|
||||
else
|
||||
self:T( "Initialize CargoHostSpawn" )
|
||||
self.CargoHostSpawn = SPAWN:New( self.CargoHostName ):Limit( 1, 1 )
|
||||
self.CargoHostSpawn:ReSpawn( 1 )
|
||||
end
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -114,6 +129,7 @@ function CARGO_ZONE:ReportCargosToClient( Client, CargoType )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function CARGO_ZONE:Signal()
|
||||
self:F()
|
||||
|
||||
@@ -148,16 +164,15 @@ function CARGO_ZONE:Signal()
|
||||
|
||||
else
|
||||
|
||||
local CurrentPosition = { x = self.CargoZone.point.x, y = self.CargoZone.point.z }
|
||||
self.CargoZone.point.y = land.getHeight( CurrentPosition ) + 2
|
||||
local ZonePointVec3 = self:GetPointVec3( self.SignalHeight ) -- Get the zone position + the landheight + 2 meters
|
||||
|
||||
if self.SignalType.ID == CARGO_ZONE.SIGNAL.TYPE.SMOKE.ID then
|
||||
|
||||
trigger.action.smoke( self.CargoZone.point, self.SignalColor.TRIGGERCOLOR )
|
||||
trigger.action.smoke( ZonePointVec3, self.SignalColor.TRIGGERCOLOR )
|
||||
Signalled = true
|
||||
|
||||
elseif self.SignalType.ID == CARGO_ZONE.SIGNAL.TYPE.FLARE.ID then
|
||||
trigger.action.signalFlare( self.CargoZone.point, self.SignalColor.TRIGGERCOLOR, 0 )
|
||||
trigger.action.signalFlare( ZonePointVec3, self.SignalColor.TRIGGERCOLOR, 0 )
|
||||
Signalled = false
|
||||
|
||||
end
|
||||
@@ -168,85 +183,121 @@ function CARGO_ZONE:Signal()
|
||||
|
||||
end
|
||||
|
||||
function CARGO_ZONE:WhiteSmoke()
|
||||
function CARGO_ZONE:WhiteSmoke( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:BlueSmoke()
|
||||
function CARGO_ZONE:BlueSmoke( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.BLUE
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:RedSmoke()
|
||||
function CARGO_ZONE:RedSmoke( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:OrangeSmoke()
|
||||
function CARGO_ZONE:OrangeSmoke( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.ORANGE
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:GreenSmoke()
|
||||
function CARGO_ZONE:GreenSmoke( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function CARGO_ZONE:WhiteFlare()
|
||||
function CARGO_ZONE:WhiteFlare( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:RedFlare()
|
||||
function CARGO_ZONE:RedFlare( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:GreenFlare()
|
||||
function CARGO_ZONE:GreenFlare( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function CARGO_ZONE:YellowFlare()
|
||||
function CARGO_ZONE:YellowFlare( SignalHeight )
|
||||
self:F()
|
||||
|
||||
self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE
|
||||
self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.YELLOW
|
||||
|
||||
if SignalHeight then
|
||||
self.SignalHeight = SignalHeight
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -517,7 +568,8 @@ function CARGO_GROUP:Spawn( Client )
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnFromUnit( self.CargoZone:GetCargoHostUnit(), 60, 30, 1 ):GetName()
|
||||
else
|
||||
--- ReSpawn the Cargo in the CargoZone without a host ...
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, 1 ):GetName()
|
||||
self:T( self.CargoZone )
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, true, 1 ):GetName()
|
||||
end
|
||||
self:StatusNone()
|
||||
end
|
||||
@@ -557,64 +609,72 @@ function CARGO_GROUP:OnBoard( Client, LandingZone, OnBoardSide )
|
||||
|
||||
local CargoGroup = Group.getByName( self.CargoGroupName )
|
||||
|
||||
local CargoUnits = CargoGroup:getUnits()
|
||||
local CargoPos = CargoUnits[1]:getPoint()
|
||||
local CargoUnit = CargoGroup:getUnit(1)
|
||||
local CargoPos = CargoUnit:getPoint()
|
||||
|
||||
self.CargoInAir = CargoUnit:inAir()
|
||||
|
||||
self:T( self.CargoInAir )
|
||||
|
||||
-- Only move the group to the carrier when the cargo is not in the air
|
||||
-- (eg. cargo can be on a oil derrick, moving the cargo on the oil derrick will drop the cargo on the sea).
|
||||
if not self.CargoInAir then
|
||||
|
||||
local Points = {}
|
||||
|
||||
self:T( 'CargoPos x = ' .. CargoPos.x .. " z = " .. CargoPos.z )
|
||||
self:T( 'CarrierPosMove x = ' .. CarrierPosMove.x .. " z = " .. CarrierPosMove.z )
|
||||
|
||||
Points[#Points+1] = routines.ground.buildWP( CargoPos, "Cone", 10 )
|
||||
|
||||
self:T( 'Points[1] x = ' .. Points[1].x .. " y = " .. Points[1].y )
|
||||
|
||||
if OnBoardSide == nil then
|
||||
OnBoardSide = CLIENT.ONBOARDSIDE.NONE
|
||||
end
|
||||
|
||||
if OnBoardSide == CLIENT.ONBOARDSIDE.LEFT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding LEFT" )
|
||||
CarrierPosMove.z = CarrierPosMove.z - 25
|
||||
CarrierPosOnBoard.z = CarrierPosOnBoard.z - 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.RIGHT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding RIGHT" )
|
||||
CarrierPosMove.z = CarrierPosMove.z + 25
|
||||
CarrierPosOnBoard.z = CarrierPosOnBoard.z + 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.BACK then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding BACK" )
|
||||
CarrierPosMove.x = CarrierPosMove.x - 25
|
||||
CarrierPosOnBoard.x = CarrierPosOnBoard.x - 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.FRONT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding FRONT" )
|
||||
CarrierPosMove.x = CarrierPosMove.x + 25
|
||||
CarrierPosOnBoard.x = CarrierPosOnBoard.x + 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.NONE then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding CENTRAL" )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPos, "Cone", 10 )
|
||||
|
||||
end
|
||||
self:T( "TransportCargoOnBoard: Routing " .. self.CargoGroupName )
|
||||
|
||||
routines.scheduleFunction( routines.goRoute, { self.CargoGroupName, Points}, timer.getTime() + 4 )
|
||||
local Points = {}
|
||||
|
||||
self:T( 'CargoPos x = ' .. CargoPos.x .. " z = " .. CargoPos.z )
|
||||
self:T( 'CarrierPosMove x = ' .. CarrierPosMove.x .. " z = " .. CarrierPosMove.z )
|
||||
|
||||
Points[#Points+1] = routines.ground.buildWP( CargoPos, "Cone", 10 )
|
||||
|
||||
self:T( 'Points[1] x = ' .. Points[1].x .. " y = " .. Points[1].y )
|
||||
|
||||
if OnBoardSide == nil then
|
||||
OnBoardSide = CLIENT.ONBOARDSIDE.NONE
|
||||
end
|
||||
|
||||
if OnBoardSide == CLIENT.ONBOARDSIDE.LEFT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding LEFT" )
|
||||
CarrierPosMove.z = CarrierPosMove.z - 25
|
||||
CarrierPosOnBoard.z = CarrierPosOnBoard.z - 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.RIGHT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding RIGHT" )
|
||||
CarrierPosMove.z = CarrierPosMove.z + 25
|
||||
CarrierPosOnBoard.z = CarrierPosOnBoard.z + 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.BACK then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding BACK" )
|
||||
CarrierPosMove.x = CarrierPosMove.x - 25
|
||||
CarrierPosOnBoard.x = CarrierPosOnBoard.x - 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.FRONT then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding FRONT" )
|
||||
CarrierPosMove.x = CarrierPosMove.x + 25
|
||||
CarrierPosOnBoard.x = CarrierPosOnBoard.x + 5
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosMove, "Cone", 10 )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPosOnBoard, "Cone", 10 )
|
||||
|
||||
elseif OnBoardSide == CLIENT.ONBOARDSIDE.NONE then
|
||||
|
||||
self:T( "TransportCargoOnBoard: Onboarding CENTRAL" )
|
||||
Points[#Points+1] = routines.ground.buildWP( CarrierPos, "Cone", 10 )
|
||||
|
||||
end
|
||||
self:T( "TransportCargoOnBoard: Routing " .. self.CargoGroupName )
|
||||
|
||||
routines.scheduleFunction( routines.goRoute, { self.CargoGroupName, Points}, timer.getTime() + 4 )
|
||||
end
|
||||
|
||||
self:StatusLoading( Client )
|
||||
|
||||
@@ -628,12 +688,19 @@ function CARGO_GROUP:OnBoarded( Client, LandingZone )
|
||||
|
||||
local OnBoarded = false
|
||||
|
||||
local CargoGroup = Group.getByName( self.CargoGroupName )
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:ClientPosition(), 25 ) then
|
||||
CargoGroup:destroy()
|
||||
self:StatusLoaded( Client )
|
||||
OnBoarded = true
|
||||
end
|
||||
local CargoGroup = Group.getByName( self.CargoGroupName )
|
||||
|
||||
if not self.CargoInAir then
|
||||
if routines.IsPartOfGroupInRadius( CargoGroup, Client:ClientPosition(), 25 ) then
|
||||
CargoGroup:destroy()
|
||||
self:StatusLoaded( Client )
|
||||
OnBoarded = true
|
||||
end
|
||||
else
|
||||
CargoGroup:destroy()
|
||||
self:StatusLoaded( Client )
|
||||
OnBoarded = true
|
||||
end
|
||||
|
||||
return OnBoarded
|
||||
end
|
||||
|
||||
@@ -10,6 +10,7 @@ Include.File( "Task" )
|
||||
|
||||
--- The CLEANUP class.
|
||||
-- @type CLEANUP
|
||||
-- @extends Base#BASE
|
||||
CLEANUP = {
|
||||
ClassName = "CLEANUP",
|
||||
ZoneNames = {},
|
||||
@@ -40,15 +41,8 @@ function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self,
|
||||
self.TimeInterval = TimeInterval
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._EventAddForCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_STARTUP, self._EventAddForCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_HIT, self._EventAddForCleanUp ) -- , self._EventHitCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._EventCrash ) -- , self._EventHitCleanUp )
|
||||
--self:AddEvent( world.event.S_EVENT_DEAD, self._EventCrash )
|
||||
self:AddEvent( world.event.S_EVENT_SHOT, self._EventShot )
|
||||
_EVENTDISPATCHER:OnBirth( self._OnEventBirth, self )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
self.CleanUpScheduler = routines.scheduleFunction( self._CleanUpScheduler, { self }, timer.getTime() + 1, TimeInterval )
|
||||
|
||||
return self
|
||||
@@ -84,9 +78,8 @@ function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName )
|
||||
local CleanUpGroupUnits = CleanUpGroup:getUnits()
|
||||
if #CleanUpGroupUnits == 1 then
|
||||
local CleanUpGroupName = CleanUpGroup:getName()
|
||||
local Event = {["initiator"]=CleanUpUnit,["id"]=8}
|
||||
world.onEvent( Event )
|
||||
trigger.action.deactivateGroup( CleanUpGroup )
|
||||
--self:CreateEventCrash( timer.getTime(), CleanUpUnit )
|
||||
CleanUpGroup:destroy()
|
||||
self:T( { "Destroyed Group:", CleanUpGroupName } )
|
||||
else
|
||||
CleanUpUnit:destroy()
|
||||
@@ -111,13 +104,43 @@ function CLEANUP:_DestroyMissile( MissileObject )
|
||||
end
|
||||
end
|
||||
|
||||
function CLEANUP:_OnEventBirth( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
self.CleanUpList[Event.IniDCSUnitName] = {}
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnit = Event.IniDCSUnit
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroup = Event.IniDCSGroup
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroupName = Event.IniDCSGroupName
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnitName = Event.IniDCSUnitName
|
||||
|
||||
_EVENTDISPATCHER:OnEngineShutDownForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnEngineStartUpForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnHitForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnPilotDeadForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnCrashForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnShotForUnit( Event.IniDCSUnitName, self._EventShot, self )
|
||||
|
||||
--self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._EventAddForCleanUp )
|
||||
--self:AddEvent( world.event.S_EVENT_ENGINE_STARTUP, self._EventAddForCleanUp )
|
||||
-- self:AddEvent( world.event.S_EVENT_HIT, self._EventAddForCleanUp ) -- , self._EventHitCleanUp )
|
||||
-- self:AddEvent( world.event.S_EVENT_CRASH, self._EventCrash ) -- , self._EventHitCleanUp )
|
||||
-- --self:AddEvent( world.event.S_EVENT_DEAD, self._EventCrash )
|
||||
-- self:AddEvent( world.event.S_EVENT_SHOT, self._EventShot )
|
||||
--
|
||||
-- self:EnableEvents()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--- Detects if a crash event occurs.
|
||||
-- Crashed units go into a CleanUpList for removal.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventCrash( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
--TODO: This stuff is not working due to a DCS bug. Burning units cannot be destroyed.
|
||||
--MESSAGE:New( "Crash ", "Crash", 10, "Crash" ):ToAll()
|
||||
-- self:T("before getGroup")
|
||||
-- local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
||||
@@ -126,44 +149,28 @@ function CLEANUP:_EventCrash( event )
|
||||
-- self:T("after deactivateGroup")
|
||||
-- event.initiator:destroy()
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
local CleanUpUnitName = CleanUpUnit:getName() -- return the name of the Unit
|
||||
local CleanUpGroup = Unit.getGroup(CleanUpUnit)-- Identify the Group
|
||||
local CleanUpGroupName = ""
|
||||
if CleanUpGroup and CleanUpGroup:isExist() then
|
||||
CleanUpGroupName = CleanUpGroup:getName() -- return the name of the Group
|
||||
end
|
||||
|
||||
self.CleanUpList[CleanUpUnitName] = {}
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpUnit = CleanUpUnit
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpGroup = CleanUpGroup
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpGroupName = CleanUpGroupName
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpUnitName = CleanUpUnitName
|
||||
self.CleanUpList[Event.IniDCSUnitName] = {}
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnit = Event.IniDCSUnit
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroup = Event.IniDCSGroup
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroupName = Event.IniDCSGroupName
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnitName = Event.IniDCSUnitName
|
||||
|
||||
end
|
||||
|
||||
--- Detects if a unit shoots a missile.
|
||||
-- If this occurs within one of the zones, then the weapon used must be destroyed.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventShot( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventShot( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
||||
local _groupname = _grp:getName() -- return the name of the group
|
||||
local _unittable = {event.initiator:getName()} -- return the name of the units in the group
|
||||
local _SEADmissile = event.weapon -- Identify the weapon fired
|
||||
--local _SEADmissileName = _SEADmissile:getTypeName() -- return weapon type
|
||||
--trigger.action.outText( string.format("Alerte, depart missile " ..string.format(_SEADmissileName)), 20) --debug message
|
||||
-- Start of the 2nd loop
|
||||
--self:T( "Missile Launched = " .. _SEADmissileName )
|
||||
|
||||
-- Test if the missile was fired within one of the CLEANUP.ZoneNames.
|
||||
local CurrentLandingZoneID = 0
|
||||
CurrentLandingZoneID = routines.IsUnitInZones( event.initiator, self.ZoneNames )
|
||||
CurrentLandingZoneID = routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames )
|
||||
if ( CurrentLandingZoneID ) then
|
||||
-- Okay, the missile was fired within the CLEANUP.ZoneNames, destroy the fired weapon.
|
||||
--_SEADmissile:destroy()
|
||||
routines.scheduleFunction( CLEANUP._DestroyMissile, {self, _SEADmissile}, timer.getTime() + 0.1)
|
||||
routines.scheduleFunction( CLEANUP._DestroyMissile, { self, Event.Weapon }, timer.getTime() + 0.1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -171,38 +178,28 @@ end
|
||||
--- Detects if the Unit has an S_EVENT_HIT within the given ZoneNames. If this is the case, destroy the unit.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventHitCleanUp( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventHitCleanUp( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
if CleanUpUnit and CleanUpUnit:isExist() and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then
|
||||
local CleanUpUnitName = event.initiator:getName() -- return the name of the Unit
|
||||
|
||||
if routines.IsUnitInZones( CleanUpUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( "Life: " .. CleanUpUnitName .. ' = ' .. CleanUpUnit:getLife() .. "/" .. CleanUpUnit:getLife0() )
|
||||
if CleanUpUnit:getLife() < CleanUpUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. CleanUpUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, {self, CleanUpUnit}, timer.getTime() + 0.1)
|
||||
if Event.IniDCSUnit then
|
||||
if routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( { "Life: ", Event.IniDCSUnitName, ' = ', Event.IniDCSUnit:getLife(), "/", Event.IniDCSUnit:getLife0() } )
|
||||
if Event.IniDCSUnit:getLife() < Event.IniDCSUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. Event.IniDCSUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, { self, Event.IniDCSUnit }, timer.getTime() + 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local CleanUpTgtUnit = event.target -- the target Unit
|
||||
if CleanUpTgtUnit and CleanUpTgtUnit:isExist() and Object.getCategory(CleanUpTgtUnit) == Object.Category.UNIT then
|
||||
local CleanUpTgtUnitName = event.target:getName() -- return the name of the target Unit
|
||||
local CleanUpTgtGroup = Unit.getGroup(event.target)-- Identify the target Group
|
||||
local CleanUpTgtGroupName = CleanUpTgtGroup:getName() -- return the name of the target Group
|
||||
|
||||
|
||||
if routines.IsUnitInZones( CleanUpTgtUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( "Life: " .. CleanUpTgtUnitName .. ' = ' .. CleanUpTgtUnit:getLife() .. "/" .. CleanUpTgtUnit:getLife0() )
|
||||
if CleanUpTgtUnit:getLife() < CleanUpTgtUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. CleanUpTgtUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, {self, CleanUpTgtUnit}, timer.getTime() + 0.1)
|
||||
if Event.TgtDCSUnit then
|
||||
if routines.IsUnitInZones( Event.TgtDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( { "Life: ", Event.TgtDCSUnitName, ' = ', Event.TgtDCSUnit:getLife(), "/", Event.TgtDCSUnit:getLife0() } )
|
||||
if Event.TgtDCSUnit:getLife() < Event.TgtDCSUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. Event.TgtDCSUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, { self, Event.TgtDCSUnit }, timer.getTime() + 0.1 )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Add the @{DCSUnit#Unit} to the CleanUpList for CleanUp.
|
||||
@@ -224,24 +221,20 @@ end
|
||||
--- Detects if the Unit has an S_EVENT_ENGINE_SHUTDOWN or an S_EVENT_HIT within the given ZoneNames. If this is the case, add the Group to the CLEANUP List.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventAddForCleanUp( event )
|
||||
function CLEANUP:_EventAddForCleanUp( Event )
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
if CleanUpUnit and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then
|
||||
local CleanUpUnitName = CleanUpUnit:getName() -- return the name of the Unit
|
||||
if self.CleanUpList[CleanUpUnitName] == nil then
|
||||
if routines.IsUnitInZones( CleanUpUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( CleanUpUnit, CleanUpUnitName )
|
||||
if Event.IniDCSUnit then
|
||||
if self.CleanUpList[Event.IniDCSUnitName] == nil then
|
||||
if routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( Event.IniDCSUnit, Event.IniDCSUnitName )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local CleanUpTgtUnit = event.target -- the target Unit
|
||||
if CleanUpTgtUnit and Object.getCategory(CleanUpTgtUnit) == Object.Category.UNIT then
|
||||
local CleanUpTgtUnitName = CleanUpTgtUnit:getName() -- return the name of the target Unit
|
||||
if self.CleanUpList[CleanUpTgtUnitName] == nil then
|
||||
if routines.IsUnitInZones( CleanUpTgtUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( CleanUpTgtUnit, CleanUpTgtUnitName )
|
||||
if Event.TgtDCSUnit then
|
||||
if self.CleanUpList[Event.TgtDCSUnitName] == nil then
|
||||
if routines.IsUnitInZones( Event.TgtDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( Event.TgtDCSUnit, Event.TgtDCSUnitName )
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -259,9 +252,11 @@ local CleanUpSurfaceTypeText = {
|
||||
--- At the defined time interval, CleanUp the Groups within the CleanUpList.
|
||||
-- @param #CLEANUP self
|
||||
function CLEANUP:_CleanUpScheduler()
|
||||
self:F( "CleanUp Scheduler" )
|
||||
self:F( { "CleanUp Scheduler" } )
|
||||
|
||||
local CleanUpCount = 0
|
||||
for CleanUpUnitName, UnitData in pairs( self.CleanUpList ) do
|
||||
CleanUpCount = CleanUpCount + 1
|
||||
|
||||
self:T( { CleanUpUnitName, UnitData } )
|
||||
local CleanUpUnit = Unit.getByName(UnitData.CleanUpUnitName)
|
||||
@@ -269,7 +264,7 @@ function CLEANUP:_CleanUpScheduler()
|
||||
local CleanUpUnitName = UnitData.CleanUpUnitName
|
||||
if CleanUpUnit then
|
||||
self:T( { "CleanUp Scheduler", "Checking:", CleanUpUnitName } )
|
||||
if _Database:GetStatusGroup( CleanUpGroupName ) ~= "ReSpawn" then
|
||||
if _DATABASE:GetStatusGroup( CleanUpGroupName ) ~= "ReSpawn" then
|
||||
local CleanUpUnitVec3 = CleanUpUnit:getPoint()
|
||||
--self:T( CleanUpUnitVec3 )
|
||||
local CleanUpUnitVec2 = {}
|
||||
@@ -323,5 +318,6 @@ function CLEANUP:_CleanUpScheduler()
|
||||
self.CleanUpList[CleanUpUnitName] = nil -- Not anymore in the DCSRTE
|
||||
end
|
||||
end
|
||||
self:T(CleanUpCount)
|
||||
end
|
||||
|
||||
|
||||
199
Moose/Client.lua
199
Moose/Client.lua
@@ -1,6 +1,18 @@
|
||||
--- The CLIENT models client units in multi player missions.
|
||||
-- Clients are those groups defined within the Mission Editor that have the skillset defined as "Client" or "Player".
|
||||
-- Note that clients are NOT the same as groups, they are NOT necessarily alive.
|
||||
--
|
||||
-- @{#CLIENT} class
|
||||
-- ================
|
||||
-- Clients are those **Units** defined within the Mission Editor that have the skillset defined as __Client__ or __Player__.
|
||||
-- Note that clients are NOT the same as Units, they are NOT necessarily alive.
|
||||
--
|
||||
-- Clients are being used by the @{MISSION} class to follow players and register their successes.
|
||||
--
|
||||
-- CLIENT construction methods:
|
||||
-- ============================
|
||||
-- Create a new CLIENT object with the @{#CLIENT.New} method:
|
||||
--
|
||||
-- * @{#CLIENT.New}: Creates a new CLIENT object taking the name of the **DCSUnit** that is a client as defined within the mission editor.
|
||||
--
|
||||
-- @module Client
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -33,9 +45,9 @@ CLIENT = {
|
||||
}
|
||||
|
||||
|
||||
--- Use this method to register new Clients within the MOF.
|
||||
--- Use this method to register new Clients within a mission.
|
||||
-- @param #CLIENT self
|
||||
-- @param #string ClientName Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client.
|
||||
-- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor.
|
||||
-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client.
|
||||
-- @return #CLIENT
|
||||
-- @usage
|
||||
@@ -51,7 +63,7 @@ function CLIENT:New( ClientName, ClientBriefing )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( ClientName, ClientBriefing )
|
||||
|
||||
self.ClientName = ClientName
|
||||
self.ClientName = ClientName
|
||||
self:AddBriefing( ClientBriefing )
|
||||
self.MessageSwitch = true
|
||||
|
||||
@@ -91,11 +103,12 @@ end
|
||||
-- @param #CLIENT self
|
||||
-- @param #function CallBack Function.
|
||||
-- @return #CLIENT
|
||||
function CLIENT:Alive( CallBack )
|
||||
function CLIENT:Alive( CallBack, ... )
|
||||
self:F()
|
||||
|
||||
self.ClientAlive2 = false
|
||||
self.ClientCallBack = CallBack
|
||||
self.ClientParameters = arg
|
||||
self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
|
||||
|
||||
return self
|
||||
@@ -131,9 +144,9 @@ end
|
||||
function CLIENT:IsAlive()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local ClientDCSGroup = self:GetDCSGroup()
|
||||
local ClientUnit = Unit.getByName( self.ClientName )
|
||||
|
||||
if ClientDCSGroup then
|
||||
if ClientUnit and ClientUnit:isExist() then
|
||||
self:T("true")
|
||||
return true
|
||||
end
|
||||
@@ -150,7 +163,7 @@ function CLIENT:_AliveCheckScheduler()
|
||||
if self:IsAlive() then
|
||||
if self.ClientAlive2 == false then
|
||||
self:T("Calling Callback function")
|
||||
self.ClientCallBack( self )
|
||||
self.ClientCallBack( self, unpack( self.ClientParameters ) )
|
||||
self.ClientAlive2 = true
|
||||
end
|
||||
else
|
||||
@@ -175,6 +188,8 @@ function CLIENT:GetDCSGroup()
|
||||
-- return nil
|
||||
-- end
|
||||
|
||||
local ClientUnit = Unit.getByName( self.ClientName )
|
||||
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) }
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
self:T3( { "CoalitionData:", CoalitionData } )
|
||||
@@ -182,49 +197,49 @@ function CLIENT:GetDCSGroup()
|
||||
self:T3( { "UnitData:", UnitData } )
|
||||
if UnitData and UnitData:isExist() then
|
||||
|
||||
local ClientGroup = Group.getByName( self.ClientName )
|
||||
if ClientGroup then
|
||||
self:T3( "ClientGroup = " .. self.ClientName )
|
||||
if ClientGroup:isExist() then
|
||||
if ClientGroup:getID() == UnitData:getGroup():getID() then
|
||||
self:T3( "Normal logic" )
|
||||
self:T3( self.ClientName .. " : group found!" )
|
||||
return ClientGroup
|
||||
end
|
||||
else
|
||||
-- Now we need to resolve the bugs in DCS 1.5 ...
|
||||
-- Consult the database for the units of the Client Group. (ClientGroup:getUnits() returns nil)
|
||||
self:T3( "Bug 1.5 logic" )
|
||||
local ClientUnits = _Database.Groups[self.ClientName].Units
|
||||
self:T3( { ClientUnits[1].name, env.getValueDictByKey(ClientUnits[1].name) } )
|
||||
for ClientUnitID, ClientUnitData in pairs( ClientUnits ) do
|
||||
self:T3( { tonumber(UnitData:getID()), ClientUnitData.unitId } )
|
||||
if tonumber(UnitData:getID()) == ClientUnitData.unitId then
|
||||
local ClientGroupTemplate = _Database.Groups[self.ClientName].Template
|
||||
self.ClientID = ClientGroupTemplate.groupId
|
||||
self.ClientGroupUnit = UnitData
|
||||
self:T3( self.ClientName .. " : group found in bug 1.5 resolvement logic!" )
|
||||
return ClientGroup
|
||||
end
|
||||
end
|
||||
end
|
||||
-- else
|
||||
-- error( "Client " .. self.ClientName .. " not found!" )
|
||||
end
|
||||
--self:E(self.ClientName)
|
||||
if ClientUnit then
|
||||
local ClientGroup = ClientUnit:getGroup()
|
||||
if ClientGroup then
|
||||
self:T3( "ClientGroup = " .. self.ClientName )
|
||||
if ClientGroup:isExist() and UnitData:getGroup():isExist() then
|
||||
if ClientGroup:getID() == UnitData:getGroup():getID() then
|
||||
self:T3( "Normal logic" )
|
||||
self:T3( self.ClientName .. " : group found!" )
|
||||
self.ClientGroupID = ClientGroup:getID()
|
||||
self.ClientGroupName = ClientGroup:getName()
|
||||
return ClientGroup
|
||||
end
|
||||
else
|
||||
-- Now we need to resolve the bugs in DCS 1.5 ...
|
||||
-- Consult the database for the units of the Client Group. (ClientGroup:getUnits() returns nil)
|
||||
self:T3( "Bug 1.5 logic" )
|
||||
local ClientGroupTemplate = _DATABASE.Templates.Units[self.ClientName].GroupTemplate
|
||||
self.ClientGroupID = ClientGroupTemplate.groupId
|
||||
self.ClientGroupName = _DATABASE.Templates.Units[self.ClientName].GroupName
|
||||
self:T3( self.ClientName .. " : group found in bug 1.5 resolvement logic!" )
|
||||
return ClientGroup
|
||||
end
|
||||
-- else
|
||||
-- error( "Client " .. self.ClientName .. " not found!" )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- For non player clients
|
||||
local ClientGroup = Group.getByName( self.ClientName )
|
||||
if ClientGroup then
|
||||
self:T3( "ClientGroup = " .. self.ClientName )
|
||||
if ClientGroup:isExist() then
|
||||
self:T3( "Normal logic" )
|
||||
self:T3( self.ClientName .. " : group found!" )
|
||||
return ClientGroup
|
||||
end
|
||||
end
|
||||
if ClientUnit then
|
||||
local ClientGroup = ClientUnit:getGroup()
|
||||
if ClientGroup then
|
||||
self:T3( "ClientGroup = " .. self.ClientName )
|
||||
if ClientGroup:isExist() then
|
||||
self:T3( "Normal logic" )
|
||||
self:T3( self.ClientName .. " : group found!" )
|
||||
return ClientGroup
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.ClientGroupID = nil
|
||||
self.ClientGroupUnit = nil
|
||||
@@ -239,16 +254,9 @@ end
|
||||
-- @return DCSTypes#Group.ID
|
||||
function CLIENT:GetClientGroupID()
|
||||
|
||||
if not self.ClientGroupID then
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
if ClientGroup and ClientGroup:isExist() then
|
||||
self.ClientGroupID = ClientGroup:getID()
|
||||
else
|
||||
self.ClientGroupID = self.ClientID
|
||||
end
|
||||
end
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
|
||||
self:T( self.ClientGroupID )
|
||||
--self:E( self.ClientGroupID ) -- Determined in GetDCSGroup()
|
||||
return self.ClientGroupID
|
||||
end
|
||||
|
||||
@@ -258,16 +266,9 @@ end
|
||||
-- @return #string
|
||||
function CLIENT:GetClientGroupName()
|
||||
|
||||
if not self.ClientGroupName then
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
if ClientGroup and ClientGroup:isExist() then
|
||||
self.ClientGroupName = ClientGroup:getName()
|
||||
else
|
||||
self.ClientGroupName = self.ClientName
|
||||
end
|
||||
end
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
|
||||
self:T( self.ClientGroupName )
|
||||
self:T( self.ClientGroupName ) -- Determined in GetDCSGroup()
|
||||
return self.ClientGroupName
|
||||
end
|
||||
|
||||
@@ -275,14 +276,15 @@ end
|
||||
-- @param #CLIENT self
|
||||
-- @return Unit#UNIT
|
||||
function CLIENT:GetClientGroupUnit()
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
|
||||
if ClientGroup and ClientGroup:isExist() then
|
||||
return UNIT:New( ClientGroup:getUnit(1) )
|
||||
else
|
||||
return UNIT:New( self.ClientGroupUnit )
|
||||
local ClientDCSUnit = Unit.getByName( self.ClientName )
|
||||
|
||||
self:T( self.ClientDCSUnit )
|
||||
if ClientDCSUnit and ClientDCSUnit:isExist() then
|
||||
local ClientUnit = _DATABASE.Units[ self.ClientName ]
|
||||
self:T2( ClientUnit )
|
||||
return ClientUnit
|
||||
end
|
||||
end
|
||||
|
||||
@@ -292,12 +294,11 @@ end
|
||||
function CLIENT:GetClientGroupDCSUnit()
|
||||
self:F2()
|
||||
|
||||
local ClientGroup = self:GetDCSGroup()
|
||||
local ClientDCSUnit = Unit.getByName( self.ClientName )
|
||||
|
||||
if ClientGroup and ClientGroup:isExist() then
|
||||
return ClientGroup:getUnit(1)
|
||||
else
|
||||
return self.ClientGroupUnit
|
||||
if ClientDCSUnit and ClientDCSUnit:isExist() then
|
||||
self:T2( ClientDCSUnit )
|
||||
return ClientDCSUnit
|
||||
end
|
||||
end
|
||||
|
||||
@@ -314,7 +315,7 @@ end
|
||||
function CLIENT:GetPointVec2()
|
||||
self:F()
|
||||
|
||||
ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
@@ -330,6 +331,44 @@ function CLIENT:GetPointVec2()
|
||||
return nil
|
||||
end
|
||||
|
||||
function CLIENT:GetPositionVec3()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local UnitPos = DCSUnit:getPosition().p
|
||||
|
||||
self:T( UnitPos )
|
||||
return UnitPos
|
||||
end
|
||||
|
||||
function CLIENT:GetID()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local UnitID = DCSUnit:getID()
|
||||
|
||||
self:T( UnitID )
|
||||
return UnitID
|
||||
end
|
||||
|
||||
function CLIENT:GetName()
|
||||
self:F( self.ClientName )
|
||||
|
||||
self:T( self.ClientName )
|
||||
return self.ClientName
|
||||
end
|
||||
|
||||
function CLIENT:GetTypeName()
|
||||
self:F( self.ClientName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.ClientName )
|
||||
local TypeName = DCSUnit:getTypeName()
|
||||
|
||||
self:T( TypeName )
|
||||
return TypeName
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Returns the position of the CLIENT in @{DCSTypes#Vec3} format.
|
||||
-- @param #CLIENT self
|
||||
@@ -337,7 +376,7 @@ end
|
||||
function CLIENT:ClientPosition()
|
||||
self:F()
|
||||
|
||||
ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
@@ -354,7 +393,7 @@ end
|
||||
function CLIENT:GetAltitude()
|
||||
self:F()
|
||||
|
||||
ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
local ClientGroupUnit = self:GetClientGroupDCSUnit()
|
||||
|
||||
if ClientGroupUnit then
|
||||
if ClientGroupUnit:isExist() then
|
||||
|
||||
1580
Moose/Database.lua
1580
Moose/Database.lua
File diff suppressed because it is too large
Load Diff
@@ -16,10 +16,11 @@ DESTROYBASETASK = {
|
||||
}
|
||||
|
||||
--- Creates a new DESTROYBASETASK.
|
||||
-- @param string DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".
|
||||
-- @param string DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".
|
||||
-- @param table{string,...} DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.
|
||||
-- @param ?number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @param #DESTROYBASETASK self
|
||||
-- @param #string DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".
|
||||
-- @param #string DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".
|
||||
-- @param #list<#string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.
|
||||
-- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @return DESTROYBASETASK
|
||||
function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage )
|
||||
local self = BASE:Inherit( self, TASK:New() )
|
||||
@@ -30,34 +31,31 @@ function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPre
|
||||
self.DestroyGroupPrefixes = DestroyGroupPrefixes
|
||||
self.DestroyGroupType = DestroyGroupType
|
||||
self.DestroyUnitType = DestroyUnitType
|
||||
if DestroyPercentage then
|
||||
self.DestroyPercentage = DestroyPercentage
|
||||
end
|
||||
self.TaskBriefing = "Task: Destroy " .. DestroyGroupType .. "."
|
||||
self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEGROUPSDESTROYED:New(), STAGEDONE:New() }
|
||||
self.SetStage( self, 1 )
|
||||
|
||||
--self.AddEvent( self, world.event.S_EVENT_DEAD, self.EventDead )
|
||||
|
||||
--env.info( 'New Table self = ' .. tostring(self) )
|
||||
--env.info( 'New Table self = ' .. tostring(self) )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Handle the S_EVENT_DEAD events to validate the destruction of units for the task monitoring.
|
||||
-- @param event Event structure of DCS world.
|
||||
function DESTROYBASETASK:EventDead( event )
|
||||
self:F( { 'EventDead', event } )
|
||||
-- @param #DESTROYBASETASK self
|
||||
-- @param Event#EVENTDATA Event structure of MOOSE.
|
||||
function DESTROYBASETASK:EventDead( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local DestroyUnit = event.initiator
|
||||
local DestroyUnitName = DestroyUnit:getName()
|
||||
local DestroyGroup = Unit.getGroup( DestroyUnit )
|
||||
local DestroyGroupName = ""
|
||||
if DestroyGroup and DestroyGroup:isExist() then
|
||||
local DestroyGroupName = DestroyGroup:getName()
|
||||
end
|
||||
if Event.IniDCSUnit then
|
||||
local DestroyUnit = Event.IniDCSUnit
|
||||
local DestroyUnitName = Event.IniDCSUnitName
|
||||
local DestroyGroup = Event.IniDCSGroup
|
||||
local DestroyGroupName = Event.IniDCSGroupName
|
||||
|
||||
--TODO: I need to fix here if 2 groups in the mission have a similar name with GroupPrefix equal, then i should differentiate for which group the goal was reached!
|
||||
--I may need to test if for the goalverb that group goal was reached or something. Need to think about it a bit more ...
|
||||
local UnitsDestroyed = 0
|
||||
self:T( DestroyGroupName )
|
||||
self:T( DestroyUnitName )
|
||||
for DestroyGroupPrefixID, DestroyGroupPrefix in pairs( self.DestroyGroupPrefixes ) do
|
||||
self:T( DestroyGroupPrefix )
|
||||
if string.find( DestroyGroupName, DestroyGroupPrefix, 1, true ) then
|
||||
@@ -70,6 +68,7 @@ function DESTROYBASETASK:EventDead( event )
|
||||
self:T( { UnitsDestroyed } )
|
||||
self:IncreaseGoalCount( UnitsDestroyed, self.GoalVerb )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Validate task completeness of DESTROYBASETASK.
|
||||
|
||||
@@ -11,10 +11,11 @@ DESTROYGROUPSTASK = {
|
||||
}
|
||||
|
||||
--- Creates a new DESTROYGROUPSTASK.
|
||||
-- @param string DestroyGroupType String describing the group to be destroyed.
|
||||
-- @param string DestroyUnitType String describing the unit to be destroyed.
|
||||
-- @param table{string,...} DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.
|
||||
-- @param ?number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @param #DESTROYGROUPSTASK self
|
||||
-- @param #string DestroyGroupType String describing the group to be destroyed.
|
||||
-- @param #string DestroyUnitType String describing the unit to be destroyed.
|
||||
-- @param #list<#string> DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.
|
||||
-- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
---@return DESTROYGROUPSTASK
|
||||
function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage )
|
||||
local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) )
|
||||
@@ -23,34 +24,34 @@ function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupN
|
||||
self.Name = 'Destroy Groups'
|
||||
self.GoalVerb = "Destroy " .. DestroyGroupType
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self.EventDead )
|
||||
--Child.AddEvent( Child, world.event.S_EVENT_PILOT_DEAD, Child.EventDead )
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
_EVENTDISPATCHER:OnCrash( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Report Goal Progress.
|
||||
-- @param Group DestroyGroup Group structure describing the group to be evaluated.
|
||||
-- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated.
|
||||
-- @param #DESTROYGROUPSTASK self
|
||||
-- @param DCSGroup#Group DestroyGroup Group structure describing the group to be evaluated.
|
||||
-- @param DCSUnit#Unit DestroyUnit Unit structure describing the Unit to be evaluated.
|
||||
-- @return #number The DestroyCount reflecting the amount of units destroyed within the group.
|
||||
function DESTROYGROUPSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit )
|
||||
self:F( { DestroyGroup, DestroyUnit } )
|
||||
self:T( DestroyGroup:getSize() )
|
||||
self:F( { DestroyGroup, DestroyUnit, self.DestroyPercentage } )
|
||||
|
||||
local DestroyGroupSize = DestroyGroup:getSize() - 1 -- When a DEAD event occurs, the getSize is still one larger than the destroyed unit.
|
||||
local DestroyGroupInitialSize = DestroyGroup:getInitialSize()
|
||||
self:T( { DestroyGroupSize, DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) } )
|
||||
|
||||
local DestroyCount = 0
|
||||
if DestroyGroup then
|
||||
if ( ( DestroyGroup:getInitialSize() * self.DestroyPercentage ) / 100 ) - DestroyGroup:getSize() <= 0 then
|
||||
if DestroyGroupSize <= DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) then
|
||||
DestroyCount = 1
|
||||
--[[ else
|
||||
if DestroyGroup:getSize() == 1 then
|
||||
if DestroyUnit and DestroyUnit:getLife() <= 1.0 then
|
||||
DestroyCount = 1
|
||||
end
|
||||
end
|
||||
]] end
|
||||
end
|
||||
else
|
||||
DestroyCount = 1
|
||||
end
|
||||
|
||||
self:T( DestroyCount )
|
||||
|
||||
return DestroyCount
|
||||
end
|
||||
|
||||
@@ -18,8 +18,8 @@ function DESTROYRADARSTASK:New( DestroyGroupNames )
|
||||
self:F()
|
||||
|
||||
self.Name = 'Destroy Radars'
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ function DESTROYUNITTYPESTASK:New( DestroyGroupType, DestroyUnitType, DestroyGro
|
||||
self.Name = 'Destroy Unit Types'
|
||||
self.GoalVerb = "Destroy " .. DestroyGroupType
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -1,69 +1,90 @@
|
||||
--- Taking the lead of AI escorting your flight.
|
||||
-- The ESCORT class allows you to interact with escorting AI on your flight and take the lead.
|
||||
--
|
||||
-- @{#ESCORT} class
|
||||
-- ================
|
||||
-- The @{#ESCORT} class allows you to interact with escorting AI on your flight and take the lead.
|
||||
-- Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).
|
||||
--
|
||||
-- The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes.
|
||||
-- Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.
|
||||
--
|
||||
-- RADIO MENUs that can be created:
|
||||
-- ================================
|
||||
-- Find a summary below of the current available commands:
|
||||
--
|
||||
-- **1. Navigation ...:** Escort group navigation functions:
|
||||
-- Navigation ...:
|
||||
-- ---------------
|
||||
-- Escort group navigation functions:
|
||||
--
|
||||
-- * **"Join-Up and Follow at x meters":** The escort group fill follow you at about x meters, and they will follow you.
|
||||
-- * **"Flare":** Provides menu commands to let the escort group shoot a flare in the air in a color.
|
||||
-- * **"Smoke":** Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
|
||||
-- * **"Join-Up and Follow at x meters":** The escort group fill follow you at about x meters, and they will follow you.
|
||||
-- * **"Flare":** Provides menu commands to let the escort group shoot a flare in the air in a color.
|
||||
-- * **"Smoke":** Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
|
||||
--
|
||||
-- **2. Hold position ...:** Escort group navigation functions:
|
||||
-- Hold position ...:
|
||||
-- ------------------
|
||||
-- Escort group navigation functions:
|
||||
--
|
||||
-- * **"At current location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At client location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At current location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At client location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
--
|
||||
-- **3. Report targets ...:** Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).
|
||||
-- Report targets ...:
|
||||
-- -------------------
|
||||
-- Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).
|
||||
--
|
||||
-- * **"Report now":** Will report the current detected targets.
|
||||
-- * **"Report targets on":** Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
|
||||
-- * **"Report targets off":** Will stop detecting targets.
|
||||
-- * **"Report now":** Will report the current detected targets.
|
||||
-- * **"Report targets on":** Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
|
||||
-- * **"Report targets off":** Will stop detecting targets.
|
||||
--
|
||||
-- **4. Scan targets ...:** Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.
|
||||
-- Scan targets ...:
|
||||
-- -----------------
|
||||
-- Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.
|
||||
--
|
||||
-- * **"Scan targets 30 seconds":** Scan 30 seconds for targets.
|
||||
-- * **"Scan targets 60 seconds":** Scan 60 seconds for targets.
|
||||
-- * **"Scan targets 30 seconds":** Scan 30 seconds for targets.
|
||||
-- * **"Scan targets 60 seconds":** Scan 60 seconds for targets.
|
||||
--
|
||||
-- **5. Attack targets ...:** This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.
|
||||
-- Attack targets ...:
|
||||
-- -------------------
|
||||
-- This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.
|
||||
--
|
||||
-- **6. Request assistance from ...:** This menu item will list all detected targets within a 15km range, as with the menu item **Attack Targets**.
|
||||
-- Request assistance from ...:
|
||||
-- ----------------------------
|
||||
-- This menu item will list all detected targets within a 15km range, as with the menu item **Attack Targets**.
|
||||
-- This menu item allows to request attack support from other escorts supporting the current client group.
|
||||
-- eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles.
|
||||
-- eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.
|
||||
--
|
||||
-- **7. ROE ...:** Defines the Rules of Engagement of the escort group when in flight.
|
||||
-- ROE ...:
|
||||
-- --------
|
||||
-- Sets the Rules of Engagement (ROE) of the escort group when in flight.
|
||||
--
|
||||
-- * **"Hold Fire":** The escort group will hold fire.
|
||||
-- * **"Return Fire":** The escort group will return fire.
|
||||
-- * **"Open Fire":** The escort group will open fire on designated targets.
|
||||
-- * **"Weapon Free":** The escort group will engage with any target.
|
||||
-- * **"Hold Fire":** The escort group will hold fire.
|
||||
-- * **"Return Fire":** The escort group will return fire.
|
||||
-- * **"Open Fire":** The escort group will open fire on designated targets.
|
||||
-- * **"Weapon Free":** The escort group will engage with any target.
|
||||
--
|
||||
-- **8. Evasion ...:** Will define the evasion techniques that the escort group will perform during flight or combat.
|
||||
-- Evasion ...:
|
||||
-- ------------
|
||||
-- Will define the evasion techniques that the escort group will perform during flight or combat.
|
||||
--
|
||||
-- * **"Fight until death":** The escort group will have no reaction to threats.
|
||||
-- * **"Use flares, chaff and jammers":** The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
|
||||
-- * **"Evade enemy fire":** The rescort group will evade enemy fire before firing.
|
||||
-- * **"Go below radar and evade fire":** The escort group will perform evasive vertical manoeuvres.
|
||||
-- * **"Fight until death":** The escort group will have no reaction to threats.
|
||||
-- * **"Use flares, chaff and jammers":** The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
|
||||
-- * **"Evade enemy fire":** The rescort group will evade enemy fire before firing.
|
||||
-- * **"Go below radar and evade fire":** The escort group will perform evasive vertical manoeuvres.
|
||||
--
|
||||
-- **9. Resume Mission ...:** Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
-- Resume Mission ...:
|
||||
-- -------------------
|
||||
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
|
||||
--
|
||||
-- **10. Abort Current Task:** Cancel the current task and rejoin formation.
|
||||
--
|
||||
-- 1. ESCORT object construction methods.
|
||||
-- --------------------------------------
|
||||
-- ESCORT construction methods.
|
||||
-- ============================
|
||||
-- Create a new SPAWN object with the @{#ESCORT.New} method:
|
||||
--
|
||||
-- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Group#GROUP} for a @{Client#CLIENT}, with an optional briefing text.
|
||||
--
|
||||
-- 2. ESCORT object initialization methods.
|
||||
-- ----------------------------------------
|
||||
-- The following menus can be setup:
|
||||
-- ESCORT initialization methods.
|
||||
-- ==============================
|
||||
-- The following menus are created within the RADIO MENU of an active unit hosted by a player:
|
||||
--
|
||||
-- * @{#ESCORT.MenuFollowAt}: Creates a menu to make the escort follow the client.
|
||||
-- * @{#ESCORT.MenuHoldAtEscortPosition}: Creates a menu to hold the escort at its current position.
|
||||
@@ -77,7 +98,7 @@
|
||||
-- * @{#ESCORT.MenuROE: Creates a menu structure to set the rules of engagement of the escort.
|
||||
-- * @{#ESCORT.MenuEvasion: Creates a menu structure to set the evasion techniques when the escort is under threat.
|
||||
-- * @{#ESCORT.MenuResumeMission}: Creates a menu structure so that the escort can resume from a waypoint.
|
||||
--
|
||||
--
|
||||
-- @module Escort
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -87,8 +108,7 @@ Include.File( "Database" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Zone" )
|
||||
|
||||
|
||||
--- ESCORT class
|
||||
---
|
||||
-- @type ESCORT
|
||||
-- @extends Base#BASE
|
||||
-- @field Client#CLIENT EscortClient
|
||||
|
||||
511
Moose/Event.lua
Normal file
511
Moose/Event.lua
Normal file
@@ -0,0 +1,511 @@
|
||||
--- The EVENT class models an efficient event handling process between other classes and its units, weapons.
|
||||
-- @module Event
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
|
||||
--- The EVENT structure
|
||||
-- @type EVENT
|
||||
-- @field #EVENT.Events Events
|
||||
EVENT = {
|
||||
ClassName = "EVENT",
|
||||
ClassID = 0,
|
||||
}
|
||||
|
||||
local _EVENTCODES = {
|
||||
"S_EVENT_SHOT",
|
||||
"S_EVENT_HIT",
|
||||
"S_EVENT_TAKEOFF",
|
||||
"S_EVENT_LAND",
|
||||
"S_EVENT_CRASH",
|
||||
"S_EVENT_EJECTION",
|
||||
"S_EVENT_REFUELING",
|
||||
"S_EVENT_DEAD",
|
||||
"S_EVENT_PILOT_DEAD",
|
||||
"S_EVENT_BASE_CAPTURED",
|
||||
"S_EVENT_MISSION_START",
|
||||
"S_EVENT_MISSION_END",
|
||||
"S_EVENT_TOOK_CONTROL",
|
||||
"S_EVENT_REFUELING_STOP",
|
||||
"S_EVENT_BIRTH",
|
||||
"S_EVENT_HUMAN_FAILURE",
|
||||
"S_EVENT_ENGINE_STARTUP",
|
||||
"S_EVENT_ENGINE_SHUTDOWN",
|
||||
"S_EVENT_PLAYER_ENTER_UNIT",
|
||||
"S_EVENT_PLAYER_LEAVE_UNIT",
|
||||
"S_EVENT_PLAYER_COMMENT",
|
||||
"S_EVENT_SHOOTING_START",
|
||||
"S_EVENT_SHOOTING_END",
|
||||
"S_EVENT_MAX",
|
||||
}
|
||||
|
||||
--- The Event structure
|
||||
-- @type EVENTDATA
|
||||
-- @field id
|
||||
-- @field initiator
|
||||
-- @field target
|
||||
-- @field weapon
|
||||
-- @field IniDCSUnit
|
||||
-- @field IniDCSUnitName
|
||||
-- @field IniDCSGroup
|
||||
-- @field IniDCSGroupName
|
||||
-- @field TgtDCSUnit
|
||||
-- @field TgtDCSUnitName
|
||||
-- @field TgtDCSGroup
|
||||
-- @field TgtDCSGroupName
|
||||
-- @field Weapon
|
||||
-- @field WeaponName
|
||||
-- @field WeaponTgtDCSUnit
|
||||
|
||||
--- The Events structure
|
||||
-- @type EVENT.Events
|
||||
-- @field #number IniUnit
|
||||
|
||||
function EVENT:New()
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F()
|
||||
self.EventHandler = world.addEventHandler( self )
|
||||
return self
|
||||
end
|
||||
|
||||
function EVENT:EventText( EventID )
|
||||
|
||||
local EventText = _EVENTCODES[EventID]
|
||||
|
||||
return EventText
|
||||
end
|
||||
|
||||
|
||||
--- Initializes the Events structure for the event
|
||||
-- @param #EVENT self
|
||||
-- @param DCSWorld#world.event EventID
|
||||
-- @param #string EventClass
|
||||
-- @return #EVENT.Events
|
||||
function EVENT:Init( EventID, EventClass )
|
||||
self:F3( { _EVENTCODES[EventID], EventClass } )
|
||||
if not self.Events[EventID] then
|
||||
self.Events[EventID] = {}
|
||||
end
|
||||
if not self.Events[EventID][EventClass] then
|
||||
self.Events[EventID][EventClass] = {}
|
||||
end
|
||||
return self.Events[EventID][EventClass]
|
||||
end
|
||||
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @param #function OnEventFunction
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, OnEventFunction )
|
||||
self:F2( EventTemplate.name )
|
||||
|
||||
for EventUnitID, EventUnit in pairs( EventTemplate.units ) do
|
||||
OnEventFunction( self, EventUnit.name, EventFunction, EventSelf )
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_X event independent from a unit or a weapon.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @param EventID
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventGeneric( EventFunction, EventSelf, EventID )
|
||||
self:F2( { EventID } )
|
||||
|
||||
local Event = self:Init( EventID, EventSelf:GetClassNameAndID() )
|
||||
Event.EventFunction = EventFunction
|
||||
Event.EventSelf = EventSelf
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set a new listener for an S_EVENT_X event
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @param EventID
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, EventID )
|
||||
self:F2( EventDCSUnitName )
|
||||
|
||||
local Event = self:Init( EventID, EventSelf:GetClassNameAndID() )
|
||||
if not Event.IniUnit then
|
||||
Event.IniUnit = {}
|
||||
end
|
||||
Event.IniUnit[EventDCSUnitName] = {}
|
||||
Event.IniUnit[EventDCSUnitName].EventFunction = EventFunction
|
||||
Event.IniUnit[EventDCSUnitName].EventSelf = EventSelf
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Create an OnBirth event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirthForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnBirthForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_BIRTH event, and registers the unit born.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirth( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_BIRTH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_BIRTH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName The id of the unit for the event to be handled.
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirthForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_BIRTH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnCrash event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrashForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnCrashForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_CRASH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrash( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_CRASH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_CRASH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrashForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_CRASH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDeadForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnDeadForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDead( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set a new listener for an S_EVENT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDeadForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_PILOT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnPilotDeadForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_PILOT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnLandForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnLandForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_LAND event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnLandForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_LAND )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnTakeOffForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnTakeOffForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_TAKEOFF event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnTakeOffForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_TAKEOFF )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineShutDownForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnEngineShutDownForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_ENGINE_SHUTDOWN event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineShutDownForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_ENGINE_SHUTDOWN )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_ENGINE_STARTUP event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineStartUpForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_ENGINE_STARTUP )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_SHOT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnShot( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_SHOT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_SHOT event for a unit.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnShotForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_SHOT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_HIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnHit( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_HIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_HIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnHitForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_HIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_PLAYER_ENTER_UNIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnPlayerEnterUnit( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_PLAYER_ENTER_UNIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_PLAYER_LEAVE_UNIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnPlayerLeaveUnit( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_PLAYER_LEAVE_UNIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
function EVENT:onEvent( Event )
|
||||
self:F( { _EVENTCODES[Event.id], Event } )
|
||||
|
||||
if self and self.Events and self.Events[Event.id] then
|
||||
if Event.initiator and Event.initiator:getCategory() == Object.Category.UNIT then
|
||||
Event.IniDCSUnit = Event.initiator
|
||||
Event.IniDCSGroup = Event.IniDCSUnit:getGroup()
|
||||
Event.IniDCSUnitName = Event.IniDCSUnit:getName()
|
||||
Event.IniDCSGroupName = ""
|
||||
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
|
||||
Event.IniDCSGroupName = Event.IniDCSGroup:getName()
|
||||
end
|
||||
end
|
||||
if Event.target then
|
||||
if Event.target and Event.target:getCategory() == Object.Category.UNIT then
|
||||
Event.TgtDCSUnit = Event.target
|
||||
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
|
||||
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
||||
Event.TgtDCSGroupName = ""
|
||||
if Event.TgtDCSGroup and Event.TgtDCSGroup:isExist() then
|
||||
Event.TgtDCSGroupName = Event.TgtDCSGroup:getName()
|
||||
end
|
||||
end
|
||||
end
|
||||
if Event.weapon then
|
||||
Event.Weapon = Event.weapon
|
||||
Event.WeaponName = Event.Weapon:getTypeName()
|
||||
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
|
||||
end
|
||||
self:E( { _EVENTCODES[Event.id], Event } )
|
||||
for ClassName, EventData in pairs( self.Events[Event.id] ) do
|
||||
if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then
|
||||
self:T2( { "Calling event function for class ", ClassName, " unit ", Event.IniDCSUnitName } )
|
||||
EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventSelf, Event )
|
||||
else
|
||||
if Event.IniDCSUnit and not EventData.IniUnit then
|
||||
self:T2( { "Calling event function for class ", ClassName } )
|
||||
EventData.EventFunction( EventData.EventSelf, Event )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -92,6 +92,18 @@ function GROUP:NewFromDCSUnit( DCSUnit )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Returns the name of the Group.
|
||||
-- @param #GROUP self
|
||||
-- @return #string GroupName
|
||||
function GROUP:GetName()
|
||||
|
||||
local GroupName = self.DCSGroup:getName()
|
||||
|
||||
return GroupName
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Retrieve the group mission and allow to place function hooks within the mission waypoint plan.
|
||||
-- Use the method @{Group#GROUP:WayPointFunction} to define the hook functions for specific waypoints.
|
||||
-- Use the method @{Group@GROUP:WayPointExecute) to start the execution of the new mission plan.
|
||||
@@ -128,7 +140,12 @@ function GROUP:TaskFunction( WayPoint, WayPointIndex, FunctionString, FunctionAr
|
||||
|
||||
local DCSScript = {}
|
||||
DCSScript[#DCSScript+1] = "local MissionGroup = GROUP.FindGroup( ... ) "
|
||||
DCSScript[#DCSScript+1] = FunctionString .. "( MissionGroup, " .. table.concat( FunctionArguments, "," ) .. ")"
|
||||
|
||||
if FunctionArguments.n > 0 then
|
||||
DCSScript[#DCSScript+1] = FunctionString .. "( MissionGroup, " .. table.concat( FunctionArguments, "," ) .. ")"
|
||||
else
|
||||
DCSScript[#DCSScript+1] = FunctionString .. "( MissionGroup )"
|
||||
end
|
||||
|
||||
DCSTask = self:TaskWrappedAction(
|
||||
self:CommandDoScript(
|
||||
@@ -594,6 +611,41 @@ function GROUP:TaskWrappedAction( DCSCommand, Index )
|
||||
return DCSTaskWrappedAction
|
||||
end
|
||||
|
||||
--- Executes a command action
|
||||
-- @param #GROUP self
|
||||
-- @param DCSCommand#Command DCSCommand
|
||||
-- @return #GROUP self
|
||||
function GROUP:SetCommand( DCSCommand )
|
||||
self:F( DCSCommand )
|
||||
|
||||
local Controller = self:_GetController()
|
||||
|
||||
Controller:setCommand( DCSCommand )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Perform a switch waypoint command
|
||||
-- @param #GROUP self
|
||||
-- @param #number FromWayPoint
|
||||
-- @param #number ToWayPoint
|
||||
-- @return DCSTask#Task
|
||||
function GROUP:CommandSwitchWayPoint( FromWayPoint, ToWayPoint, Index )
|
||||
self:F( { FromWayPoint, ToWayPoint, Index } )
|
||||
|
||||
local CommandSwitchWayPoint = {
|
||||
id = 'SwitchWaypoint',
|
||||
params = {
|
||||
fromWaypointIndex = FromWayPoint,
|
||||
goToWaypointIndex = ToWayPoint,
|
||||
},
|
||||
}
|
||||
|
||||
self:T( { CommandSwitchWayPoint } )
|
||||
return CommandSwitchWayPoint
|
||||
end
|
||||
|
||||
|
||||
--- Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
|
||||
-- @param #GROUP self
|
||||
-- @param #Vec2 Point The point to hold the position.
|
||||
@@ -601,7 +653,7 @@ end
|
||||
-- @param #number Speed The speed flying when holding the position.
|
||||
-- @return #GROUP self
|
||||
function GROUP:TaskOrbitCircleAtVec2( Point, Altitude, Speed )
|
||||
self:F( { self.GroupName, Point, Altitude, Speed } )
|
||||
self:F( { self.GroupName, Point, Altitude, Speed } )
|
||||
|
||||
-- pattern = enum AI.Task.OribtPattern,
|
||||
-- point = Vec2,
|
||||
@@ -732,8 +784,41 @@ function GROUP:TaskAttackUnit( AttackUnit )
|
||||
params = { unitId = AttackUnit:GetID(),
|
||||
expend = AI.Task.WeaponExpend.TWO,
|
||||
groupAttack = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
self:T( { DCSTask } )
|
||||
return DCSTask
|
||||
end
|
||||
|
||||
--- Attack a Group.
|
||||
-- @param #GROUP self
|
||||
-- @param Group#GROUP AttackGroup The Group to be attacked.
|
||||
-- @return DCSTask#Task The DCS task structure.
|
||||
function GROUP:TaskAttackGroup( AttackGroup )
|
||||
self:F( { self.GroupName, AttackGroup } )
|
||||
|
||||
-- AttackGroup = {
|
||||
-- id = 'AttackGroup',
|
||||
-- params = {
|
||||
-- groupId = Group.ID,
|
||||
-- weaponType = number,
|
||||
-- expend = enum AI.Task.WeaponExpend,
|
||||
-- attackQty = number,
|
||||
-- directionEnabled = boolean,
|
||||
-- direction = Azimuth,
|
||||
-- altitudeEnabled = boolean,
|
||||
-- altitude = Distance,
|
||||
-- attackQtyLimit = boolean,
|
||||
-- }
|
||||
-- }
|
||||
|
||||
local DCSTask
|
||||
DCSTask = { id = 'AttackGroup',
|
||||
params = { groupId = AttackGroup:GetID(),
|
||||
expend = AI.Task.WeaponExpend.TWO,
|
||||
},
|
||||
},
|
||||
|
||||
self:T( { DCSTask } )
|
||||
return DCSTask
|
||||
@@ -999,7 +1084,7 @@ end
|
||||
function GROUP:GetTaskMission()
|
||||
self:F( self.GroupName )
|
||||
|
||||
return routines.utils.deepCopy( _Database.Groups[self.GroupName].Template )
|
||||
return routines.utils.deepCopy( _DATABASE.Templates.Groups[self.GroupName].Template )
|
||||
end
|
||||
|
||||
--- Return the mission route of the group.
|
||||
@@ -1008,7 +1093,7 @@ end
|
||||
function GROUP:GetTaskRoute()
|
||||
self:F( self.GroupName )
|
||||
|
||||
return routines.utils.deepCopy( _Database.Groups[self.GroupName].Template.route.points )
|
||||
return routines.utils.deepCopy( _DATABASE.Templates.Groups[self.GroupName].Template.route.points )
|
||||
end
|
||||
|
||||
--- Return the route of a group by using the @{Database#DATABASE} class.
|
||||
@@ -1032,7 +1117,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
||||
|
||||
self:T( { GroupName } )
|
||||
|
||||
local Template = _Database.Groups[GroupName].Template
|
||||
local Template = _DATABASE.Templates.Groups[GroupName].Template
|
||||
|
||||
if Template then
|
||||
if not Begin then
|
||||
|
||||
124
Moose/Menu.lua
124
Moose/Menu.lua
@@ -245,3 +245,127 @@ function MENU_CLIENT_COMMAND:Remove()
|
||||
self.ParentMenu.Menus[self.MenuPath] = nil
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- The MENU_COALITION class
|
||||
-- @type MENU_COALITION
|
||||
-- @extends Menu#MENU
|
||||
MENU_COALITION = {
|
||||
ClassName = "MENU_COALITION"
|
||||
}
|
||||
|
||||
--- Creates a new coalition menu item
|
||||
-- @param #MENU_COALITION self
|
||||
-- @param DCSCoalition#coalition.side MenuCoalition The coalition owning the menu.
|
||||
-- @param #string MenuText The text for the menu.
|
||||
-- @param #table ParentMenu The parent menu.
|
||||
-- @return #MENU_COALITION self
|
||||
function MENU_COALITION:New( MenuCoalition, MenuText, ParentMenu )
|
||||
|
||||
-- Arrange meta tables
|
||||
local MenuParentPath = {}
|
||||
if ParentMenu ~= nil then
|
||||
MenuParentPath = ParentMenu.MenuPath
|
||||
end
|
||||
|
||||
local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) )
|
||||
self:F( { MenuCoalition, MenuText, ParentMenu } )
|
||||
|
||||
self.MenuCoalition = MenuCoalition
|
||||
self.MenuParentPath = MenuParentPath
|
||||
self.MenuText = MenuText
|
||||
self.ParentMenu = ParentMenu
|
||||
|
||||
self.Menus = {}
|
||||
|
||||
self:T( { MenuParentPath, MenuText } )
|
||||
|
||||
self.MenuPath = missionCommands.addSubMenuForCoalition( self.MenuCoalition, MenuText, MenuParentPath )
|
||||
|
||||
self:T( { self.MenuPath } )
|
||||
|
||||
if ParentMenu and ParentMenu.Menus then
|
||||
ParentMenu.Menus[self.MenuPath] = self
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Removes the sub menus recursively of this MENU_COALITION.
|
||||
-- @param #MENU_COALITION self
|
||||
-- @return #MENU_COALITION self
|
||||
function MENU_COALITION:RemoveSubMenus()
|
||||
self:F( self.MenuPath )
|
||||
|
||||
for MenuID, Menu in pairs( self.Menus ) do
|
||||
Menu:Remove()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Removes the sub menus recursively of this MENU_COALITION.
|
||||
-- @param #MENU_COALITION self
|
||||
-- @return #MENU_COALITION self
|
||||
function MENU_COALITION:Remove()
|
||||
self:F( self.MenuPath )
|
||||
|
||||
self:RemoveSubMenus()
|
||||
missionCommands.removeItemForCoalition( self.MenuCoalition, self.MenuPath )
|
||||
self.ParentMenu.Menus[self.MenuPath] = nil
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- The MENU_COALITION_COMMAND class
|
||||
-- @type MENU_COALITION_COMMAND
|
||||
-- @extends Menu#MENU
|
||||
MENU_COALITION_COMMAND = {
|
||||
ClassName = "MENU_COALITION_COMMAND"
|
||||
}
|
||||
|
||||
--- Creates a new radio command item for a group
|
||||
-- @param #MENU_COALITION_COMMAND self
|
||||
-- @param DCSCoalition#coalition.side MenuCoalition The coalition owning the menu.
|
||||
-- @param MenuText The text for the menu.
|
||||
-- @param ParentMenu The parent menu.
|
||||
-- @param CommandMenuFunction A function that is called when the menu key is pressed.
|
||||
-- @param CommandMenuArgument An argument for the function.
|
||||
-- @return #MENU_COALITION_COMMAND self
|
||||
function MENU_COALITION_COMMAND:New( MenuCoalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument )
|
||||
|
||||
-- Arrange meta tables
|
||||
|
||||
local MenuParentPath = {}
|
||||
if ParentMenu ~= nil then
|
||||
MenuParentPath = ParentMenu.MenuPath
|
||||
end
|
||||
|
||||
local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) )
|
||||
|
||||
self.MenuCoalition = MenuCoalition
|
||||
self.MenuParentPath = MenuParentPath
|
||||
self.MenuText = MenuText
|
||||
self.ParentMenu = ParentMenu
|
||||
|
||||
self:T( { MenuParentPath, MenuText, CommandMenuFunction, CommandMenuArgument } )
|
||||
|
||||
self.MenuPath = missionCommands.addCommandForCoalition( self.MenuCoalition, MenuText, MenuParentPath, CommandMenuFunction, CommandMenuArgument )
|
||||
|
||||
self.CommandMenuFunction = CommandMenuFunction
|
||||
self.CommandMenuArgument = CommandMenuArgument
|
||||
|
||||
ParentMenu.Menus[self.MenuPath] = self
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Removes a radio command item for a coalition
|
||||
-- @param #MENU_COALITION_COMMAND self
|
||||
-- @return #MENU_COALITION_COMMAND self
|
||||
function MENU_COALITION_COMMAND:Remove()
|
||||
self:F( self.MenuPath )
|
||||
|
||||
missionCommands.removeItemForCoalition( self.MenuCoalition, self.MenuPath )
|
||||
self.ParentMenu.Menus[self.MenuPath] = nil
|
||||
return nil
|
||||
end
|
||||
|
||||
680
Moose/MissileTrainer.lua
Normal file
680
Moose/MissileTrainer.lua
Normal file
@@ -0,0 +1,680 @@
|
||||
--- Provides missile training functions.
|
||||
--
|
||||
-- @{#MISSILETRAINER} class
|
||||
-- ========================
|
||||
-- The @{#MISSILETRAINER} class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft,
|
||||
-- the class will destroy the missile within a certain range, to avoid damage to your aircraft.
|
||||
-- It suports the following functionality:
|
||||
--
|
||||
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
|
||||
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range …
|
||||
-- * Provide alerts when a missile would have killed your aircraft.
|
||||
-- * Provide alerts when the missile self destructs.
|
||||
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
|
||||
--
|
||||
-- When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:
|
||||
--
|
||||
-- * **Messages**: Menu to configure all messages.
|
||||
-- * **Messages On**: Show all messages.
|
||||
-- * **Messages Off**: Disable all messages.
|
||||
-- * **Tracking**: Menu to configure missile tracking messages.
|
||||
-- * **To All**: Shows missile tracking messages to all players.
|
||||
-- * **To Target**: Shows missile tracking messages only to the player where the missile is targetted at.
|
||||
-- * **Tracking On**: Show missile tracking messages.
|
||||
-- * **Tracking Off**: Disable missile tracking messages.
|
||||
-- * **Frequency Increase**: Increases the missile tracking message frequency with one second.
|
||||
-- * **Frequency Decrease**: Decreases the missile tracking message frequency with one second.
|
||||
-- * **Alerts**: Menu to configure alert messages.
|
||||
-- * **To All**: Shows alert messages to all players.
|
||||
-- * **To Target**: Shows alter messages only to the player where the missile is (was) targetted at.
|
||||
-- * **Hits On**: Show missile hit alert messages.
|
||||
-- * **Hits Off**: Disable missile hit altert messages.
|
||||
-- * **Launches On**: Show missile launch messages.
|
||||
-- * **Launches Off**: Disable missile launch messages.
|
||||
-- * **Details**: Menu to configure message details.
|
||||
-- * **Range On**: Shows range information when a missile is fired to a target.
|
||||
-- * **Range Off**: Disable range information when a missile is fired to a target.
|
||||
-- * **Bearing On**: Shows bearing information when a missile is fired to a target.
|
||||
-- * **Bearing Off**: Disable bearing information when a missile is fired to a target.
|
||||
-- * **Distance**: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured.
|
||||
-- * **50 meter**: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.
|
||||
-- * **100 meter**: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
|
||||
-- * **150 meter**: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
|
||||
-- * **200 meter**: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
|
||||
--
|
||||
--
|
||||
-- MISSILETRAINER construction methods:
|
||||
-- ====================================
|
||||
-- Create a new MISSILETRAINER object with the @{#MISSILETRAINER.New} method:
|
||||
--
|
||||
-- * @{#MISSILETRAINER.New}: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
|
||||
--
|
||||
-- MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.
|
||||
--
|
||||
-- MISSILETRAINER initialization methods:
|
||||
-- ======================================
|
||||
-- A MISSILETRAINER object will behave differently based on the usage of initialization methods:
|
||||
--
|
||||
-- * @{#MISSILETRAINER.InitMessagesOnOff}: Sets by default the display of any message to be ON or OFF.
|
||||
-- * @{#MISSILETRAINER.InitTrackingToAll}: Sets by default the missile tracking report for all players or only for those missiles targetted to you.
|
||||
-- * @{#MISSILETRAINER.InitTrackingOnOff}: Sets by default the display of missile tracking report to be ON or OFF.
|
||||
-- * @{#MISSILETRAINER.InitTrackingFrequency}: Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.
|
||||
-- * @{#MISSILETRAINER.InitAlertsToAll}: Sets by default the display of alerts to be shown to all players or only to you.
|
||||
-- * @{#MISSILETRAINER.InitAlertsHitsOnOff}: Sets by default the display of hit alerts ON or OFF.
|
||||
-- * @{#MISSILETRAINER.InitAlertsLaunchesOnOff}: Sets by default the display of launch alerts ON or OFF.
|
||||
-- * @{#MISSILETRAINER.InitRangeOnOff}: Sets by default the display of range information of missiles ON of OFF.
|
||||
-- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF.
|
||||
-- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu.
|
||||
--
|
||||
-- @module MissileTrainer
|
||||
-- @author FlightControl
|
||||
|
||||
|
||||
Include.File( "Client" )
|
||||
Include.File( "Scheduler" )
|
||||
|
||||
--- The MISSILETRAINER class
|
||||
-- @type MISSILETRAINER
|
||||
-- @extends Base#BASE
|
||||
MISSILETRAINER = {
|
||||
ClassName = "MISSILETRAINER",
|
||||
}
|
||||
|
||||
--- Creates the main object which is handling missile tracking.
|
||||
-- When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #number Distance The distance in meters when a tracked missile needs to be destroyed when close to a player.
|
||||
-- @param #string Briefing (Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes.
|
||||
-- @return #MISSILETRAINER
|
||||
function MISSILETRAINER:New( Distance, Briefing )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( Distance )
|
||||
|
||||
if Briefing then
|
||||
self.Briefing = Briefing
|
||||
end
|
||||
|
||||
self.Schedulers = {}
|
||||
self.SchedulerID = 0
|
||||
|
||||
self.MessageInterval = 2
|
||||
self.MessageLastTime = timer.getTime()
|
||||
|
||||
self.Distance = Distance / 1000
|
||||
|
||||
_EVENTDISPATCHER:OnShot( self._EventShot, self )
|
||||
|
||||
self.DB = DATABASE:New():FilterStart()
|
||||
self.DBClients = self.DB.Clients
|
||||
self.DBUnits = self.DB.Units
|
||||
|
||||
for ClientID, Client in pairs( self.DBClients ) do
|
||||
|
||||
local function _Alive( Client )
|
||||
|
||||
if self.Briefing then
|
||||
Client:Message( self.Briefing, 15, "HELLO WORLD", "Trainer" )
|
||||
end
|
||||
|
||||
if self.MenusOnOff == true then
|
||||
Client:Message( "Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "MENU", "Trainer" )
|
||||
|
||||
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil ) -- Menu#MENU_CLIENT
|
||||
|
||||
Client.MenuMessages = MENU_CLIENT:New( Client, "Messages", Client.MainMenu )
|
||||
Client.MenuOn = MENU_CLIENT_COMMAND:New( Client, "Messages On", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = true } )
|
||||
Client.MenuOff = MENU_CLIENT_COMMAND:New( Client, "Messages Off", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = false } )
|
||||
|
||||
Client.MenuTracking = MENU_CLIENT:New( Client, "Tracking", Client.MainMenu )
|
||||
Client.MenuTrackingToAll = MENU_CLIENT_COMMAND:New( Client, "To All", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingToAll = true } )
|
||||
Client.MenuTrackingToTarget = MENU_CLIENT_COMMAND:New( Client, "To Target", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingToAll = false } )
|
||||
Client.MenuTrackOn = MENU_CLIENT_COMMAND:New( Client, "Tracking On", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingOnOff = true } )
|
||||
Client.MenuTrackOff = MENU_CLIENT_COMMAND:New( Client, "Tracking Off", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingOnOff = false } )
|
||||
Client.MenuTrackIncrease = MENU_CLIENT_COMMAND:New( Client, "Frequency Increase", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingFrequency = -1 } )
|
||||
Client.MenuTrackDecrease = MENU_CLIENT_COMMAND:New( Client, "Frequency Decrease", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingFrequency = 1 } )
|
||||
|
||||
Client.MenuAlerts = MENU_CLIENT:New( Client, "Alerts", Client.MainMenu )
|
||||
Client.MenuAlertsToAll = MENU_CLIENT_COMMAND:New( Client, "To All", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsToAll = true } )
|
||||
Client.MenuAlertsToTarget = MENU_CLIENT_COMMAND:New( Client, "To Target", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsToAll = false } )
|
||||
Client.MenuHitsOn = MENU_CLIENT_COMMAND:New( Client, "Hits On", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsHitsOnOff = true } )
|
||||
Client.MenuHitsOff = MENU_CLIENT_COMMAND:New( Client, "Hits Off", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsHitsOnOff = false } )
|
||||
Client.MenuLaunchesOn = MENU_CLIENT_COMMAND:New( Client, "Launches On", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsLaunchesOnOff = true } )
|
||||
Client.MenuLaunchesOff = MENU_CLIENT_COMMAND:New( Client, "Launches Off", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsLaunchesOnOff = false } )
|
||||
|
||||
Client.MenuDetails = MENU_CLIENT:New( Client, "Details", Client.MainMenu )
|
||||
Client.MenuDetailsDistanceOn = MENU_CLIENT_COMMAND:New( Client, "Range On", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsRangeOnOff = true } )
|
||||
Client.MenuDetailsDistanceOff = MENU_CLIENT_COMMAND:New( Client, "Range Off", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsRangeOnOff = false } )
|
||||
Client.MenuDetailsBearingOn = MENU_CLIENT_COMMAND:New( Client, "Bearing On", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsBearingOnOff = true } )
|
||||
Client.MenuDetailsBearingOff = MENU_CLIENT_COMMAND:New( Client, "Bearing Off", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsBearingOnOff = false } )
|
||||
|
||||
Client.MenuDistance = MENU_CLIENT:New( Client, "Set distance to plane", Client.MainMenu )
|
||||
Client.MenuDistance50 = MENU_CLIENT_COMMAND:New( Client, "50 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 50 / 1000 } )
|
||||
Client.MenuDistance100 = MENU_CLIENT_COMMAND:New( Client, "100 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 100 / 1000 } )
|
||||
Client.MenuDistance150 = MENU_CLIENT_COMMAND:New( Client, "150 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 150 / 1000 } )
|
||||
Client.MenuDistance200 = MENU_CLIENT_COMMAND:New( Client, "200 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 200 / 1000 } )
|
||||
else
|
||||
if Client.MainMenu then
|
||||
Client.MainMenu:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local ClientID = Client:GetID()
|
||||
self:T( ClientID )
|
||||
if not self.TrackingMissiles[ClientID] then
|
||||
self.TrackingMissiles[ClientID] = {}
|
||||
end
|
||||
self.TrackingMissiles[ClientID].Client = Client
|
||||
if not self.TrackingMissiles[ClientID].MissileData then
|
||||
self.TrackingMissiles[ClientID].MissileData = {}
|
||||
end
|
||||
end
|
||||
|
||||
Client:Alive( _Alive )
|
||||
|
||||
end
|
||||
|
||||
-- self.DB:ForEachClient(
|
||||
-- --- @param Client#CLIENT Client
|
||||
-- function( Client )
|
||||
--
|
||||
-- ... actions ...
|
||||
--
|
||||
-- end
|
||||
-- )
|
||||
|
||||
self.MessagesOnOff = true
|
||||
|
||||
self.TrackingToAll = false
|
||||
self.TrackingOnOff = true
|
||||
self.TrackingFrequency = 3
|
||||
|
||||
self.AlertsToAll = true
|
||||
self.AlertsHitsOnOff = true
|
||||
self.AlertsLaunchesOnOff = true
|
||||
|
||||
self.DetailsRangeOnOff = true
|
||||
self.DetailsBearingOnOff = true
|
||||
|
||||
self.MenusOnOff = true
|
||||
|
||||
self.TrackingMissiles = {}
|
||||
|
||||
self.TrackingScheduler = SCHEDULER:New( self, self._TrackMissiles, {}, 0.5, 0.05, 0 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
-- Initialization methods.
|
||||
|
||||
|
||||
--- Sets by default the display of any message to be ON or OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean MessagesOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitMessagesOnOff( MessagesOnOff )
|
||||
self:F( MessagesOnOff )
|
||||
|
||||
self.MessagesOnOff = MessagesOnOff
|
||||
if self.MessagesOnOff == true then
|
||||
MESSAGE:New( "Messages ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Messages OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the missile tracking report for all players or only for those missiles targetted to you.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean TrackingToAll true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitTrackingToAll( TrackingToAll )
|
||||
self:F( TrackingToAll )
|
||||
|
||||
self.TrackingToAll = TrackingToAll
|
||||
if self.TrackingToAll == true then
|
||||
MESSAGE:New( "Missile tracking to all players ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Missile tracking to all players OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of missile tracking report to be ON or OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean TrackingOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitTrackingOnOff( TrackingOnOff )
|
||||
self:F( TrackingOnOff )
|
||||
|
||||
self.TrackingOnOff = TrackingOnOff
|
||||
if self.TrackingOnOff == true then
|
||||
MESSAGE:New( "Missile tracking ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Missile tracking OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.
|
||||
-- The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #number TrackingFrequency Provide a negative or positive value in seconds to incraese or decrease the display frequency.
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitTrackingFrequency( TrackingFrequency )
|
||||
self:F( TrackingFrequency )
|
||||
|
||||
self.TrackingFrequency = self.TrackingFrequency + TrackingFrequency
|
||||
if self.TrackingFrequency < 0.5 then
|
||||
self.TrackingFrequency = 0.5
|
||||
end
|
||||
if self.TrackingFrequency then
|
||||
MESSAGE:New( "Missile tracking frequency is " .. self.TrackingFrequency .. " seconds.", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of alerts to be shown to all players or only to you.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean AlertsToAll true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitAlertsToAll( AlertsToAll )
|
||||
self:F( AlertsToAll )
|
||||
|
||||
self.AlertsToAll = AlertsToAll
|
||||
if self.AlertsToAll == true then
|
||||
MESSAGE:New( "Alerts to all players ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Alerts to all players OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of hit alerts ON or OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean AlertsHitsOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitAlertsHitsOnOff( AlertsHitsOnOff )
|
||||
self:F( AlertsHitsOnOff )
|
||||
|
||||
self.AlertsHitsOnOff = AlertsHitsOnOff
|
||||
if self.AlertsHitsOnOff == true then
|
||||
MESSAGE:New( "Alerts Hits ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Alerts Hits OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of launch alerts ON or OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean AlertsLaunchesOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitAlertsLaunchesOnOff( AlertsLaunchesOnOff )
|
||||
self:F( AlertsLaunchesOnOff )
|
||||
|
||||
self.AlertsLaunchesOnOff = AlertsLaunchesOnOff
|
||||
if self.AlertsLaunchesOnOff == true then
|
||||
MESSAGE:New( "Alerts Launches ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Alerts Launches OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of range information of missiles ON of OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean DetailsRangeOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitRangeOnOff( DetailsRangeOnOff )
|
||||
self:F( DetailsRangeOnOff )
|
||||
|
||||
self.DetailsRangeOnOff = DetailsRangeOnOff
|
||||
if self.DetailsRangeOnOff == true then
|
||||
MESSAGE:New( "Range display ON", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Range display OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets by default the display of bearing information of missiles ON of OFF.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean DetailsBearingOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitBearingOnOff( DetailsBearingOnOff )
|
||||
self:F( DetailsBearingOnOff )
|
||||
|
||||
self.DetailsBearingOnOff = DetailsBearingOnOff
|
||||
if self.DetailsBearingOnOff == true then
|
||||
MESSAGE:New( "Bearing display OFF", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Bearing display OFF", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Enables / Disables the menus.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param #boolean MenusOnOff true or false
|
||||
-- @return #MISSILETRAINER self
|
||||
function MISSILETRAINER:InitMenusOnOff( MenusOnOff )
|
||||
self:F( MenusOnOff )
|
||||
|
||||
self.MenusOnOff = MenusOnOff
|
||||
if self.MenusOnOff == true then
|
||||
MESSAGE:New( "Menus are ENABLED (only when a player rejoins a slot)", "Menu", 15, "ID" ):ToAll()
|
||||
else
|
||||
MESSAGE:New( "Menus are DISABLED", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
-- Menu functions
|
||||
|
||||
function MISSILETRAINER._MenuMessages( MenuParameters )
|
||||
|
||||
local self = MenuParameters.MenuSelf
|
||||
|
||||
if MenuParameters.MessagesOnOff ~= nil then
|
||||
self:InitMessagesOnOff( MenuParameters.MessagesOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.TrackingToAll ~= nil then
|
||||
self:InitTrackingToAll( MenuParameters.TrackingToAll )
|
||||
end
|
||||
|
||||
if MenuParameters.TrackingOnOff ~= nil then
|
||||
self:InitTrackingOnOff( MenuParameters.TrackingOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.TrackingFrequency ~= nil then
|
||||
self:InitTrackingFrequency( MenuParameters.TrackingFrequency )
|
||||
end
|
||||
|
||||
if MenuParameters.AlertsToAll ~= nil then
|
||||
self:InitAlertsToAll( MenuParameters.AlertsToAll )
|
||||
end
|
||||
|
||||
if MenuParameters.AlertsHitsOnOff ~= nil then
|
||||
self:InitAlertsHitsOnOff( MenuParameters.AlertsHitsOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.AlertsLaunchesOnOff ~= nil then
|
||||
self:InitAlertsLaunchesOnOff( MenuParameters.AlertsLaunchesOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.DetailsRangeOnOff ~= nil then
|
||||
self:InitRangeOnOff( MenuParameters.DetailsRangeOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.DetailsBearingOnOff ~= nil then
|
||||
self:InitBearingOnOff( MenuParameters.DetailsBearingOnOff )
|
||||
end
|
||||
|
||||
if MenuParameters.Distance ~= nil then
|
||||
self.Distance = MenuParameters.Distance
|
||||
MESSAGE:New( "Hit detection distance set to " .. self.Distance .. " meters", "Menu", 15, "ID" ):ToAll()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME.
|
||||
-- @param #MISSILETRAINER self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function MISSILETRAINER:_EventShot( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local TrainerSourceDCSUnit = Event.IniDCSUnit
|
||||
local TrainerSourceDCSUnitName = Event.IniDCSUnitName
|
||||
local TrainerWeapon = Event.Weapon -- Identify the weapon fired
|
||||
local TrainerWeaponName = Event.WeaponName -- return weapon type
|
||||
|
||||
self:T( "Missile Launched = " .. TrainerWeaponName )
|
||||
|
||||
local TrainerTargetDCSUnit = TrainerWeapon:getTarget() -- Identify target
|
||||
local TrainerTargetDCSUnitName = Unit.getName( TrainerTargetDCSUnit )
|
||||
local TrainerTargetSkill = _DATABASE.Templates.Units[TrainerTargetDCSUnitName].Template.skill
|
||||
|
||||
self:T(TrainerTargetDCSUnitName )
|
||||
|
||||
local Client = self.DBClients[TrainerTargetDCSUnitName]
|
||||
if Client then
|
||||
|
||||
local TrainerSourceUnit = UNIT:New(TrainerSourceDCSUnit)
|
||||
local TrainerTargetUnit = UNIT:New(TrainerTargetDCSUnit)
|
||||
|
||||
if self.MessagesOnOff == true and self.AlertsLaunchesOnOff == true then
|
||||
|
||||
local Message = MESSAGE:New(
|
||||
string.format( "%s launched a %s",
|
||||
TrainerSourceUnit:GetTypeName(),
|
||||
TrainerWeaponName
|
||||
) .. self:_AddRange( Client, TrainerWeapon ) .. self:_AddBearing( Client, TrainerWeapon ),"Launch Alert", 5, "ID" )
|
||||
|
||||
if self.AlertsToAll then
|
||||
Message:ToAll()
|
||||
else
|
||||
Message:ToClient( Client )
|
||||
end
|
||||
end
|
||||
|
||||
local ClientID = Client:GetID()
|
||||
local MissileData = {}
|
||||
MissileData.TrainerSourceUnit = TrainerSourceUnit
|
||||
MissileData.TrainerWeapon = TrainerWeapon
|
||||
MissileData.TrainerTargetUnit = TrainerTargetUnit
|
||||
MissileData.TrainerWeaponTypeName = TrainerWeapon:getTypeName()
|
||||
MissileData.TrainerWeaponLaunched = true
|
||||
table.insert( self.TrackingMissiles[ClientID].MissileData, MissileData )
|
||||
--self:T( self.TrackingMissiles )
|
||||
end
|
||||
end
|
||||
|
||||
function MISSILETRAINER:_AddRange( Client, TrainerWeapon )
|
||||
|
||||
local RangeText = ""
|
||||
|
||||
if self.DetailsRangeOnOff then
|
||||
|
||||
local PositionMissile = TrainerWeapon:getPoint()
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
|
||||
local Range = ( ( PositionMissile.x - PositionTarget.x )^2 +
|
||||
( PositionMissile.y - PositionTarget.y )^2 +
|
||||
( PositionMissile.z - PositionTarget.z )^2
|
||||
) ^ 0.5 / 1000
|
||||
|
||||
RangeText = string.format( ", at %4.2fkm", Range )
|
||||
end
|
||||
|
||||
return RangeText
|
||||
end
|
||||
|
||||
function MISSILETRAINER:_AddBearing( Client, TrainerWeapon )
|
||||
|
||||
local BearingText = ""
|
||||
|
||||
if self.DetailsBearingOnOff then
|
||||
|
||||
local PositionMissile = TrainerWeapon:getPoint()
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
|
||||
self:T2( { PositionTarget, PositionMissile })
|
||||
|
||||
local DirectionVector = { x = PositionMissile.x - PositionTarget.x, y = PositionMissile.y - PositionTarget.y, z = PositionMissile.z - PositionTarget.z }
|
||||
local DirectionRadians = math.atan2( DirectionVector.z, DirectionVector.x )
|
||||
--DirectionRadians = DirectionRadians + routines.getNorthCorrection( PositionTarget )
|
||||
if DirectionRadians < 0 then
|
||||
DirectionRadians = DirectionRadians + 2 * math.pi
|
||||
end
|
||||
local DirectionDegrees = DirectionRadians * 180 / math.pi
|
||||
|
||||
BearingText = string.format( ", %d degrees", DirectionDegrees )
|
||||
end
|
||||
|
||||
return BearingText
|
||||
end
|
||||
|
||||
|
||||
function MISSILETRAINER:_TrackMissiles()
|
||||
self:F2()
|
||||
|
||||
|
||||
local ShowMessages = false
|
||||
if self.MessagesOnOff and self.MessageLastTime + self.TrackingFrequency <= timer.getTime() then
|
||||
self.MessageLastTime = timer.getTime()
|
||||
ShowMessages = true
|
||||
end
|
||||
|
||||
-- ALERTS PART
|
||||
|
||||
-- Loop for all Player Clients to check the alerts and deletion of missiles.
|
||||
for ClientDataID, ClientData in pairs( self.TrackingMissiles ) do
|
||||
|
||||
local Client = ClientData.Client
|
||||
self:T2( { Client:GetName() } )
|
||||
|
||||
for MissileDataID, MissileData in pairs( ClientData.MissileData ) do
|
||||
self:T3( MissileDataID )
|
||||
|
||||
local TrainerSourceUnit = MissileData.TrainerSourceUnit
|
||||
local TrainerWeapon = MissileData.TrainerWeapon
|
||||
local TrainerTargetUnit = MissileData.TrainerTargetUnit
|
||||
local TrainerWeaponTypeName = MissileData.TrainerWeaponTypeName
|
||||
local TrainerWeaponLaunched = MissileData.TrainerWeaponLaunched
|
||||
|
||||
if Client and Client:IsAlive() and TrainerSourceUnit and TrainerSourceUnit:IsAlive() and TrainerWeapon and TrainerWeapon:isExist() and TrainerTargetUnit and TrainerTargetUnit:IsAlive() then
|
||||
local PositionMissile = TrainerWeapon:getPosition().p
|
||||
local PositionTarget = Client:GetPositionVec3()
|
||||
|
||||
local Distance = ( ( PositionMissile.x - PositionTarget.x )^2 +
|
||||
( PositionMissile.y - PositionTarget.y )^2 +
|
||||
( PositionMissile.z - PositionTarget.z )^2
|
||||
) ^ 0.5 / 1000
|
||||
|
||||
if Distance <= self.Distance then
|
||||
-- Hit alert
|
||||
TrainerWeapon:destroy()
|
||||
if self.MessagesOnOff == true and self.AlertsHitsOnOff == true then
|
||||
|
||||
self:T( "killed" )
|
||||
|
||||
local Message = MESSAGE:New(
|
||||
string.format( "%s launched by %s killed %s",
|
||||
TrainerWeapon:getTypeName(),
|
||||
TrainerSourceUnit:GetTypeName(),
|
||||
TrainerTargetUnit:GetPlayerName()
|
||||
),"Hit Alert", 15, "ID" )
|
||||
|
||||
if self.AlertsToAll == true then
|
||||
Message:ToAll()
|
||||
else
|
||||
Message:ToClient( Client )
|
||||
end
|
||||
|
||||
MissileData = nil
|
||||
table.remove( ClientData.MissileData, MissileDataID )
|
||||
self:T(ClientData.MissileData)
|
||||
end
|
||||
end
|
||||
else
|
||||
if not ( TrainerWeapon and TrainerWeapon:isExist() ) then
|
||||
if self.MessagesOnOff == true and self.AlertsLaunchesOnOff == true then
|
||||
-- Weapon does not exist anymore. Delete from Table
|
||||
local Message = MESSAGE:New(
|
||||
string.format( "%s launched by %s self destructed!",
|
||||
TrainerWeaponTypeName,
|
||||
TrainerSourceUnit:GetTypeName()
|
||||
),"Tracking", 5, "ID" )
|
||||
|
||||
if self.AlertsToAll == true then
|
||||
Message:ToAll()
|
||||
else
|
||||
Message:ToClient( Client )
|
||||
end
|
||||
end
|
||||
MissileData = nil
|
||||
table.remove( ClientData.MissileData, MissileDataID )
|
||||
self:T( ClientData.MissileData )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ShowMessages == true and self.MessagesOnOff == true and self.TrackingOnOff == true then -- Only do this when tracking information needs to be displayed.
|
||||
|
||||
-- TRACKING PART
|
||||
|
||||
-- For the current client, the missile range and bearing details are displayed To the Player Client.
|
||||
-- For the other clients, the missile range and bearing details are displayed To the other Player Clients.
|
||||
-- To achieve this, a cross loop is done for each Player Client <-> Other Player Client missile information.
|
||||
|
||||
-- Main Player Client loop
|
||||
for ClientDataID, ClientData in pairs( self.TrackingMissiles ) do
|
||||
|
||||
local Client = ClientData.Client
|
||||
self:T2( { Client:GetName() } )
|
||||
|
||||
|
||||
ClientData.MessageToClient = ""
|
||||
ClientData.MessageToAll = ""
|
||||
|
||||
-- Other Players Client loop
|
||||
for TrackingDataID, TrackingData in pairs( self.TrackingMissiles ) do
|
||||
|
||||
for MissileDataID, MissileData in pairs( TrackingData.MissileData ) do
|
||||
self:T3( MissileDataID )
|
||||
|
||||
local TrainerSourceUnit = MissileData.TrainerSourceUnit
|
||||
local TrainerWeapon = MissileData.TrainerWeapon
|
||||
local TrainerTargetUnit = MissileData.TrainerTargetUnit
|
||||
local TrainerWeaponTypeName = MissileData.TrainerWeaponTypeName
|
||||
local TrainerWeaponLaunched = MissileData.TrainerWeaponLaunched
|
||||
|
||||
if Client and Client:IsAlive() and TrainerSourceUnit and TrainerSourceUnit:IsAlive() and TrainerWeapon and TrainerWeapon:isExist() and TrainerTargetUnit and TrainerTargetUnit:IsAlive() then
|
||||
|
||||
if ShowMessages == true then
|
||||
local TrackingTo
|
||||
TrackingTo = string.format( " -> %s",
|
||||
TrainerWeaponTypeName
|
||||
)
|
||||
|
||||
if ClientDataID == TrackingDataID then
|
||||
if ClientData.MessageToClient == "" then
|
||||
ClientData.MessageToClient = "Missiles to You:\n"
|
||||
end
|
||||
ClientData.MessageToClient = ClientData.MessageToClient .. TrackingTo .. self:_AddRange( ClientData.Client, TrainerWeapon ) .. self:_AddBearing( ClientData.Client, TrainerWeapon ) .. "\n"
|
||||
else
|
||||
if self.TrackingToAll == true then
|
||||
if ClientData.MessageToAll == "" then
|
||||
ClientData.MessageToAll = "Missiles to other Players:\n"
|
||||
end
|
||||
ClientData.MessageToAll = ClientData.MessageToAll .. TrackingTo .. self:_AddRange( ClientData.Client, TrainerWeapon ) .. self:_AddBearing( ClientData.Client, TrainerWeapon ) .. " ( " .. TrainerTargetUnit:GetPlayerName() .. " )\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Once the Player Client and the Other Player Client tracking messages are prepared, show them.
|
||||
if ClientData.MessageToClient ~= "" or ClientData.MessageToAll ~= "" then
|
||||
local Message = MESSAGE:New( ClientData.MessageToClient .. ClientData.MessageToAll, "Tracking", 1, "ID" ):ToClient( Client )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
@@ -474,7 +474,9 @@ function MISSIONSCHEDULER.Scheduler()
|
||||
if Mission.GoalFunction ~= nil then
|
||||
Mission.GoalFunction( Mission, Client )
|
||||
end
|
||||
_Database:_AddMissionTaskScore( Client:GetClientGroupDCSUnit(), Mission.Name, 25 )
|
||||
if MISSIONSCHEDULER.Scoring then
|
||||
MISSIONSCHEDULER.Scoring:_AddMissionTaskScore( Client:GetClientGroupDCSUnit(), Mission.Name, 25 )
|
||||
end
|
||||
|
||||
-- if not Mission:IsCompleted() then
|
||||
-- end
|
||||
@@ -497,7 +499,9 @@ function MISSIONSCHEDULER.Scheduler()
|
||||
|
||||
if MissionComplete then
|
||||
Mission:Completed()
|
||||
_Database:_AddMissionScore( Mission.Name, 100 )
|
||||
if MISSIONSCHEDULER.Scoring then
|
||||
MISSIONSCHEDULER.Scoring:_AddMissionScore( Mission.Name, 100 )
|
||||
end
|
||||
else
|
||||
if TaskComplete then
|
||||
-- Reset for new tasking of active client
|
||||
@@ -661,3 +665,9 @@ function MISSIONSCHEDULER:Time( TimeSeconds, TimeIntervalShow, TimeShow )
|
||||
self.TimeShow = TimeShow
|
||||
end
|
||||
|
||||
--- Adds a mission scoring to the game.
|
||||
function MISSIONSCHEDULER:Scoring( Scoring )
|
||||
|
||||
self.Scoring = Scoring
|
||||
end
|
||||
|
||||
|
||||
15
Moose/Moose.lua
Normal file
15
Moose/Moose.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
--- The main include file for the MOOSE system.
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Database" )
|
||||
Include.File( "Event" )
|
||||
|
||||
-- The order of the declarations is important here. Don't touch it.
|
||||
|
||||
--- Declare the event dispatcher based on the EVENT class
|
||||
_EVENTDISPATCHER = EVENT:New() -- #EVENT
|
||||
|
||||
--- Declare the main database object, which is used internally by the MOOSE classes.
|
||||
_DATABASE = DATABASE:New():ScanEnvironment() -- Database#DATABASE
|
||||
|
||||
@@ -35,11 +35,11 @@ function MOVEMENT:New( MovePrefixes, MoveMaximum )
|
||||
self.AliveUnits = 0 -- Contains the counter how many units are currently alive
|
||||
self.MoveUnits = {} -- Reflects if the Moving for this MovePrefixes is going to be scheduled or not.
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self.OnDeadOrCrash )
|
||||
_EVENTDISPATCHER:OnBirth( self.OnBirth, self )
|
||||
|
||||
self:EnableEvents()
|
||||
-- self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth )
|
||||
--
|
||||
-- self:EnableEvents()
|
||||
|
||||
self:ScheduleStart()
|
||||
|
||||
@@ -61,43 +61,39 @@ end
|
||||
|
||||
--- Captures the birth events when new Units were spawned.
|
||||
-- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration.
|
||||
function MOVEMENT:OnBirth( event )
|
||||
self:F( { event } )
|
||||
function MOVEMENT:OnBirth( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local MovementUnit = event.initiator
|
||||
local MovementUnitName = MovementUnit:getName()
|
||||
self:T( "Birth object : " .. MovementUnitName )
|
||||
local MovementGroup = MovementUnit:getGroup()
|
||||
if MovementGroup and MovementGroup:isExist() then
|
||||
local MovementGroupName = MovementGroup:getName()
|
||||
if Event.IniDCSUnit then
|
||||
self:T( "Birth object : " .. Event.IniDCSUnitName )
|
||||
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( MovementUnitName, MovePrefix, 1, true ) then
|
||||
if string.find( Event.IniDCSUnitName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits + 1
|
||||
self.MoveUnits[MovementUnitName] = MovementGroupName
|
||||
self.MoveUnits[Event.IniDCSUnitName] = Event.IniDCSGroupName
|
||||
self:T( self.AliveUnits )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
_EVENTDISPATCHER:OnCrashForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Captures the Dead or Crash events when Units crash or are destroyed.
|
||||
-- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration.
|
||||
function MOVEMENT:OnDeadOrCrash( event )
|
||||
self:F( { event } )
|
||||
function MOVEMENT:OnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local MovementUnit = event.initiator
|
||||
local MovementUnitName = MovementUnit:getName()
|
||||
self:T( "Dead object : " .. MovementUnitName )
|
||||
if Event.IniDCSUnit then
|
||||
self:T( "Dead object : " .. Event.IniDCSUnitName )
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( MovementUnitName, MovePrefix, 1, true ) then
|
||||
if string.find( Event.IniDCSUnitName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits - 1
|
||||
self.MoveUnits[MovementUnitName] = nil
|
||||
self.MoveUnits[Event.IniDCSUnitName] = nil
|
||||
self:T( self.AliveUnits )
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ function PICKUPTASK:New( CargoType, OnBoardSide )
|
||||
self.CargoType = CargoType
|
||||
self.GoalVerb = CargoType .. " " .. self.GoalVerb
|
||||
self.OnBoardSide = OnBoardSide
|
||||
self.IsLandingRequired = false -- required to decide whether the client needs to land or not
|
||||
self.IsLandingRequired = true -- required to decide whether the client needs to land or not
|
||||
self.IsSlingLoad = false -- Indicates whether the cargo is a sling load cargo
|
||||
self.Stages = { STAGE_CARGO_INIT:New(), STAGE_CARGO_LOAD:New(), STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGELANDING:New(), STAGELANDED:New(), STAGELOAD:New(), STAGEDONE:New() }
|
||||
self.SetStage( self, 1 )
|
||||
|
||||
@@ -449,14 +449,14 @@ end
|
||||
do
|
||||
-- THE MAIN FUNCTION -- Accessed 100 times/sec.
|
||||
routines.main = function()
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 0.1) --reschedule first in case of Lua error
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 2) --reschedule first in case of Lua error
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
--area to add new stuff in
|
||||
|
||||
routines.do_scheduled_functions()
|
||||
end -- end of routines.main
|
||||
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 0.1)
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 2)
|
||||
|
||||
end
|
||||
|
||||
@@ -1524,6 +1524,47 @@ function routines.IsUnitInZones( TransportUnit, LandingZones )
|
||||
end
|
||||
end
|
||||
|
||||
function routines.IsUnitNearZonesRadius( TransportUnit, LandingZones, ZoneRadius )
|
||||
--trace.f("", "routines.IsUnitInZones" )
|
||||
|
||||
local TransportZoneResult = nil
|
||||
local TransportZonePos = nil
|
||||
local TransportZone = nil
|
||||
|
||||
-- fill-up some local variables to support further calculations to determine location of units within the zone.
|
||||
if TransportUnit then
|
||||
local TransportUnitPos = TransportUnit:getPosition().p
|
||||
if type( LandingZones ) == "table" then
|
||||
for LandingZoneID, LandingZoneName in pairs( LandingZones ) do
|
||||
TransportZone = trigger.misc.getZone( LandingZoneName )
|
||||
if TransportZone then
|
||||
TransportZonePos = {radius = TransportZone.radius, x = TransportZone.point.x, y = TransportZone.point.y, z = TransportZone.point.z}
|
||||
if ((( TransportUnitPos.x - TransportZonePos.x)^2 + (TransportUnitPos.z - TransportZonePos.z)^2)^0.5 <= ZoneRadius ) then
|
||||
TransportZoneResult = LandingZoneID
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
TransportZone = trigger.misc.getZone( LandingZones )
|
||||
TransportZonePos = {radius = TransportZone.radius, x = TransportZone.point.x, y = TransportZone.point.y, z = TransportZone.point.z}
|
||||
if ((( TransportUnitPos.x - TransportZonePos.x)^2 + (TransportUnitPos.z - TransportZonePos.z)^2)^0.5 <= ZoneRadius ) then
|
||||
TransportZoneResult = 1
|
||||
end
|
||||
end
|
||||
if TransportZoneResult then
|
||||
--trace.i( "routines", "TransportZone:" .. TransportZoneResult )
|
||||
else
|
||||
--trace.i( "routines", "TransportZone:nil logic" )
|
||||
end
|
||||
return TransportZoneResult
|
||||
else
|
||||
--trace.i( "routines", "TransportZone:nil hard" )
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function routines.IsStaticInZones( TransportStatic, LandingZones )
|
||||
--trace.f()
|
||||
|
||||
@@ -1696,7 +1737,7 @@ function routines.getGroupRoute(groupIdent, task) -- same as getGroupPoints bu
|
||||
-- refactor to search by groupId and allow groupId and groupName as inputs
|
||||
local gpId = groupIdent
|
||||
if type(groupIdent) == 'string' and not tonumber(groupIdent) then
|
||||
gpId = _Database.Groups[groupIdent].groupId
|
||||
gpId = _DATABASE.Templates.Groups[groupIdent].groupId
|
||||
end
|
||||
|
||||
for coa_name, coa_data in pairs(env.mission.coalition) do
|
||||
@@ -1746,6 +1787,7 @@ function routines.getGroupRoute(groupIdent, task) -- same as getGroupPoints bu
|
||||
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
|
||||
end --for coa_name, coa_data in pairs(mission.coalition) do
|
||||
end
|
||||
|
||||
routines.ground.patrolRoute = function(vars)
|
||||
|
||||
|
||||
|
||||
114
Moose/Scheduler.lua
Normal file
114
Moose/Scheduler.lua
Normal file
@@ -0,0 +1,114 @@
|
||||
--- Models time events calling event handing functions.
|
||||
-- @module Scheduler
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Cargo" )
|
||||
Include.File( "Message" )
|
||||
|
||||
|
||||
--- The SCHEDULER class
|
||||
-- @type SCHEDULER
|
||||
-- @extends Base#BASE
|
||||
SCHEDULER = {
|
||||
ClassName = "SCHEDULER",
|
||||
}
|
||||
|
||||
|
||||
--- SCHEDULER constructor.
|
||||
-- @param #SCHEDULER self
|
||||
-- @param #table TimeEventObject
|
||||
-- @param #function TimeEventFunction
|
||||
-- @param #table TimeEventFunctionArguments
|
||||
-- @param #number StartSeconds
|
||||
-- @param #number RepeatSecondsInterval
|
||||
-- @param #number RandomizationFactor
|
||||
-- @param #number StopSeconds
|
||||
-- @return #SCHEDULER
|
||||
function SCHEDULER:New( TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( { TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds } )
|
||||
|
||||
self.TimeEventObject = TimeEventObject
|
||||
self.TimeEventFunction = TimeEventFunction
|
||||
self.TimeEventFunctionArguments = TimeEventFunctionArguments
|
||||
self.StartSeconds = StartSeconds
|
||||
|
||||
if RepeatSecondsInterval then
|
||||
self.RepeatSecondsInterval = RepeatSecondsInterval
|
||||
else
|
||||
self.RepeatSecondsInterval = 0
|
||||
end
|
||||
|
||||
if RandomizationFactor then
|
||||
self.RandomizationFactor = RandomizationFactor
|
||||
else
|
||||
self.RandomizationFactor = 0
|
||||
end
|
||||
|
||||
if StopSeconds then
|
||||
self.StopSeconds = StopSeconds
|
||||
end
|
||||
|
||||
self.Repeat = false
|
||||
|
||||
self.StartTime = timer.getTime()
|
||||
|
||||
self:Start()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function SCHEDULER:Scheduler()
|
||||
self:F( self.TimeEventFunctionArguments )
|
||||
|
||||
local ErrorHandler = function( errmsg )
|
||||
|
||||
env.info( "Error in SCHEDULER function:" .. errmsg )
|
||||
env.info( debug.traceback() )
|
||||
|
||||
return errmsg
|
||||
end
|
||||
|
||||
local Status, Result
|
||||
if self.TimeEventObject then
|
||||
Status, Result = xpcall( function() return self.TimeEventFunction( self.TimeEventObject, unpack( self.TimeEventFunctionArguments ) ) end, ErrorHandler )
|
||||
else
|
||||
Status, Result = xpcall( function() return self.TimeEventFunction( unpack( self.TimeEventFunctionArguments ) ) end, ErrorHandler )
|
||||
end
|
||||
|
||||
self:T( { Status, Result } )
|
||||
|
||||
if Status and Status == true and Result and Result == true then
|
||||
if self.Repeat and ( not self.StopSeconds or ( self.StopSeconds and timer.getTime() <= self.StartTime + self.StopSeconds ) ) then
|
||||
timer.scheduleFunction(
|
||||
self.Scheduler,
|
||||
self,
|
||||
timer.getTime() + self.RepeatSecondsInterval + math.random( - ( self.RandomizationFactor * self.RepeatSecondsInterval / 2 ), ( self.RandomizationFactor * self.RepeatSecondsInterval / 2 ) ) + 0.01
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function SCHEDULER:Start()
|
||||
self:F( self.TimeEventObject )
|
||||
|
||||
self.Repeat = true
|
||||
timer.scheduleFunction( self.Scheduler, self, timer.getTime() + self.StartSeconds + .01 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function SCHEDULER:Stop()
|
||||
self:F( self.TimeEventObject )
|
||||
|
||||
self.Repeat = false
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
815
Moose/Scoring.lua
Normal file
815
Moose/Scoring.lua
Normal file
@@ -0,0 +1,815 @@
|
||||
--- Scoring system for MOOSE.
|
||||
-- This scoring class calculates the hits and kills that players make within a simulation session.
|
||||
-- Scoring is calculated using a defined algorithm.
|
||||
-- With a small change in MissionScripting.lua, the scoring can also be logged in a CSV file, that can then be uploaded
|
||||
-- to a database or a BI tool to publish the scoring results to the player community.
|
||||
-- @module Scoring
|
||||
-- @author FlightControl
|
||||
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Menu" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Event" )
|
||||
|
||||
|
||||
--- The Scoring class
|
||||
-- @type SCORING
|
||||
-- @field Players A collection of the current players that have joined the game.
|
||||
-- @extends Base#BASE
|
||||
SCORING = {
|
||||
ClassName = "SCORING",
|
||||
ClassID = 0,
|
||||
Players = {},
|
||||
}
|
||||
|
||||
local _SCORINGCoalition =
|
||||
{
|
||||
[1] = "Red",
|
||||
[2] = "Blue",
|
||||
}
|
||||
|
||||
local _SCORINGCategory =
|
||||
{
|
||||
[Unit.Category.AIRPLANE] = "Plane",
|
||||
[Unit.Category.HELICOPTER] = "Helicopter",
|
||||
[Unit.Category.GROUND_UNIT] = "Vehicle",
|
||||
[Unit.Category.SHIP] = "Ship",
|
||||
[Unit.Category.STRUCTURE] = "Structure",
|
||||
}
|
||||
|
||||
--- Creates a new SCORING object to administer the scoring achieved by players.
|
||||
-- @param #SCORING self
|
||||
-- @param #string GameName The name of the game. This name is also logged in the CSV score file.
|
||||
-- @return #SCORING self
|
||||
-- @usage
|
||||
-- -- Define a new scoring object for the mission Gori Valley.
|
||||
-- ScoringObject = SCORING:New( "Gori Valley" )
|
||||
function SCORING:New( GameName )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
if GameName then
|
||||
self.GameName = GameName
|
||||
else
|
||||
error( "A game name must be given to register the scoring results" )
|
||||
end
|
||||
|
||||
|
||||
_EVENTDISPATCHER:OnDead( self._EventOnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnCrash( self._EventOnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnHit( self._EventOnHit, self )
|
||||
|
||||
self.SchedulerId = routines.scheduleFunction( SCORING._FollowPlayersScheduled, { self }, 0, 5 )
|
||||
|
||||
self:ScoreMenu()
|
||||
|
||||
return self
|
||||
|
||||
end
|
||||
|
||||
--- Creates a score radio menu. Can be accessed using Radio -> F10.
|
||||
-- @param #SCORING self
|
||||
-- @return #SCORING self
|
||||
function SCORING:ScoreMenu()
|
||||
self.Menu = SUBMENU:New( 'Scoring' )
|
||||
self.AllScoresMenu = COMMANDMENU:New( 'Score All Active Players', self.Menu, SCORING.ReportScoreAll, self )
|
||||
--- = COMMANDMENU:New('Your Current Score', ReportScore, SCORING.ReportScorePlayer, self )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Follows new players entering Clients within the DCSRTE.
|
||||
-- TODO: Need to see if i can catch this also with an event. It will eliminate the schedule ...
|
||||
function SCORING:_FollowPlayersScheduled()
|
||||
self:F3( "_FollowPlayersScheduled" )
|
||||
|
||||
local ClientUnit = 0
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getPlayers(coalition.side.RED), AlivePlayersBlue = coalition.getPlayers(coalition.side.BLUE) }
|
||||
local unitId
|
||||
local unitData
|
||||
local AlivePlayerUnits = {}
|
||||
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
self:T3( { "_FollowPlayersScheduled", CoalitionData } )
|
||||
for UnitId, UnitData in pairs( CoalitionData ) do
|
||||
self:_AddPlayerFromUnit( UnitData )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Track DEAD or CRASH events for the scoring.
|
||||
-- @param #SCORING self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SCORING:_EventOnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local TargetUnit = nil
|
||||
local TargetGroup = nil
|
||||
local TargetUnitName = ""
|
||||
local TargetGroupName = ""
|
||||
local TargetPlayerName = ""
|
||||
local TargetCoalition = nil
|
||||
local TargetCategory = nil
|
||||
local TargetType = nil
|
||||
local TargetUnitCoalition = nil
|
||||
local TargetUnitCategory = nil
|
||||
local TargetUnitType = nil
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
|
||||
TargetUnit = Event.IniDCSUnit
|
||||
TargetUnitName = Event.IniDCSUnitName
|
||||
TargetGroup = Event.IniDCSGroup
|
||||
TargetGroupName = Event.IniDCSGroupName
|
||||
TargetPlayerName = TargetUnit:getPlayerName()
|
||||
|
||||
TargetCoalition = TargetUnit:getCoalition()
|
||||
--TargetCategory = TargetUnit:getCategory()
|
||||
TargetCategory = TargetUnit:getDesc().category -- Workaround
|
||||
TargetType = TargetUnit:getTypeName()
|
||||
|
||||
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
||||
TargetUnitCategory = _SCORINGCategory[TargetCategory]
|
||||
TargetUnitType = TargetType
|
||||
|
||||
self:T( { TargetUnitName, TargetGroupName, TargetPlayerName, TargetCoalition, TargetCategory, TargetType } )
|
||||
end
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Something got killed" )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitCoalition = PlayerData.UnitCoalition
|
||||
local InitCategory = PlayerData.UnitCategory
|
||||
local InitUnitCoalition = _SCORINGCoalition[InitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[InitCategory]
|
||||
|
||||
self:T( { InitUnitName, InitUnitType, InitUnitCoalition, InitCoalition, InitUnitCategory, InitCategory } )
|
||||
|
||||
-- What is he hitting?
|
||||
if TargetCategory then
|
||||
if PlayerData and PlayerData.Hit and PlayerData.Hit[TargetCategory] and PlayerData.Hit[TargetCategory][TargetUnitName] then -- Was there a hit for this unit for this player before registered???
|
||||
if not PlayerData.Kill[TargetCategory] then
|
||||
PlayerData.Kill[TargetCategory] = {}
|
||||
end
|
||||
if not PlayerData.Kill[TargetCategory][TargetType] then
|
||||
PlayerData.Kill[TargetCategory][TargetType] = {}
|
||||
PlayerData.Kill[TargetCategory][TargetType].Score = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].Penalty = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill = 0
|
||||
end
|
||||
|
||||
if InitCoalition == TargetCoalition then
|
||||
PlayerData.Penalty = PlayerData.Penalty + 25
|
||||
PlayerData.Kill[TargetCategory][TargetType].Penalty = PlayerData.Kill[TargetCategory][TargetType].Penalty + 25
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill = PlayerData.Kill[TargetCategory][TargetType].PenaltyKill + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill .. " times. Penalty: -" .. PlayerData.Kill[TargetCategory][TargetType].Penalty ..
|
||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||
"", 5, "/PENALTY" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "KILL_PENALTY", 1, -125, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
PlayerData.Score = PlayerData.Score + 10
|
||||
PlayerData.Kill[TargetCategory][TargetType].Score = PlayerData.Kill[TargetCategory][TargetType].Score + 10
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill = PlayerData.Kill[TargetCategory][TargetType].ScoreKill + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed an enemy " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill .. " times. Score: " .. PlayerData.Kill[TargetCategory][TargetType].Score ..
|
||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||
"", 5, "/SCORE" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "KILL_SCORE", 1, 10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Add a new player entering a Unit.
|
||||
function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
self:F( UnitData )
|
||||
|
||||
if UnitData and UnitData:isExist() then
|
||||
local UnitName = UnitData:getName()
|
||||
local PlayerName = UnitData:getPlayerName()
|
||||
local UnitDesc = UnitData:getDesc()
|
||||
local UnitCategory = UnitDesc.category
|
||||
local UnitCoalition = UnitData:getCoalition()
|
||||
local UnitTypeName = UnitData:getTypeName()
|
||||
|
||||
self:T( { PlayerName, UnitName, UnitCategory, UnitCoalition, UnitTypeName } )
|
||||
|
||||
if self.Players[PlayerName] == nil then -- I believe this is the place where a Player gets a life in a mission when he enters a unit ...
|
||||
self.Players[PlayerName] = {}
|
||||
self.Players[PlayerName].Hit = {}
|
||||
self.Players[PlayerName].Kill = {}
|
||||
self.Players[PlayerName].Mission = {}
|
||||
|
||||
-- for CategoryID, CategoryName in pairs( SCORINGCategory ) do
|
||||
-- self.Players[PlayerName].Hit[CategoryID] = {}
|
||||
-- self.Players[PlayerName].Kill[CategoryID] = {}
|
||||
-- end
|
||||
self.Players[PlayerName].HitPlayers = {}
|
||||
self.Players[PlayerName].HitUnits = {}
|
||||
self.Players[PlayerName].Score = 0
|
||||
self.Players[PlayerName].Penalty = 0
|
||||
self.Players[PlayerName].PenaltyCoalition = 0
|
||||
self.Players[PlayerName].PenaltyWarning = 0
|
||||
end
|
||||
|
||||
if not self.Players[PlayerName].UnitCoalition then
|
||||
self.Players[PlayerName].UnitCoalition = UnitCoalition
|
||||
else
|
||||
if self.Players[PlayerName].UnitCoalition ~= UnitCoalition then
|
||||
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50
|
||||
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
|
||||
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.",
|
||||
"",
|
||||
2,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
self:ScoreCSV( PlayerName, "COALITION_PENALTY", 1, -50, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
|
||||
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:getTypeName() )
|
||||
end
|
||||
end
|
||||
self.Players[PlayerName].UnitName = UnitName
|
||||
self.Players[PlayerName].UnitCoalition = UnitCoalition
|
||||
self.Players[PlayerName].UnitCategory = UnitCategory
|
||||
self.Players[PlayerName].UnitType = UnitTypeName
|
||||
|
||||
if self.Players[PlayerName].Penalty > 100 then
|
||||
if self.Players[PlayerName].PenaltyWarning < 1 then
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than 150, you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
|
||||
"",
|
||||
30,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1
|
||||
end
|
||||
end
|
||||
|
||||
if self.Players[PlayerName].Penalty > 150 then
|
||||
ClientGroup = GROUP:NewFromDCSUnit( UnitData )
|
||||
ClientGroup:Destroy()
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
||||
"",
|
||||
10,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Registers Scores the players completing a Mission Task.
|
||||
function SCORING:_AddMissionTaskScore( PlayerUnit, MissionName, Score )
|
||||
self:F( { PlayerUnit, MissionName, Score } )
|
||||
|
||||
local PlayerName = PlayerUnit:getPlayerName()
|
||||
|
||||
if not self.Players[PlayerName].Mission[MissionName] then
|
||||
self.Players[PlayerName].Mission[MissionName] = {}
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreTask = 0
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreMission = 0
|
||||
end
|
||||
|
||||
self:T( PlayerName )
|
||||
self:T( self.Players[PlayerName].Mission[MissionName] )
|
||||
|
||||
self.Players[PlayerName].Score = self.Players[PlayerName].Score + Score
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
|
||||
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished another Task in Mission '" .. MissionName .. "'. " ..
|
||||
Score .. " Score points added.",
|
||||
"", 20, "/SCORETASK" .. PlayerName ):ToAll()
|
||||
|
||||
self:ScoreCSV( PlayerName, "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:getName() )
|
||||
end
|
||||
|
||||
|
||||
--- Registers Mission Scores for possible multiple players that contributed in the Mission.
|
||||
function SCORING:_AddMissionScore( MissionName, Score )
|
||||
self:F( { MissionName, Score } )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
|
||||
if PlayerData.Mission[MissionName] then
|
||||
PlayerData.Score = PlayerData.Score + Score
|
||||
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished Mission '" .. MissionName .. "'. " ..
|
||||
Score .. " Score points added.",
|
||||
"", 20, "/SCOREMISSION" .. PlayerName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnHit event for the scoring.
|
||||
-- @param #SCORING self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SCORING:_EventOnHit( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local InitUnit = nil
|
||||
local InitUnitName = ""
|
||||
local InitGroup = nil
|
||||
local InitGroupName = ""
|
||||
local InitPlayerName = nil
|
||||
|
||||
local InitCoalition = nil
|
||||
local InitCategory = nil
|
||||
local InitType = nil
|
||||
local InitUnitCoalition = nil
|
||||
local InitUnitCategory = nil
|
||||
local InitUnitType = nil
|
||||
|
||||
local TargetUnit = nil
|
||||
local TargetUnitName = ""
|
||||
local TargetGroup = nil
|
||||
local TargetGroupName = ""
|
||||
local TargetPlayerName = ""
|
||||
|
||||
local TargetCoalition = nil
|
||||
local TargetCategory = nil
|
||||
local TargetType = nil
|
||||
local TargetUnitCoalition = nil
|
||||
local TargetUnitCategory = nil
|
||||
local TargetUnitType = nil
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
|
||||
InitUnit = Event.IniDCSUnit
|
||||
InitUnitName = Event.IniDCSUnitName
|
||||
InitGroup = Event.IniDCSGroup
|
||||
InitGroupName = Event.IniDCSGroupName
|
||||
InitPlayerName = InitUnit:getPlayerName()
|
||||
|
||||
InitCoalition = InitUnit:getCoalition()
|
||||
--TODO: Workaround Client DCS Bug
|
||||
--InitCategory = InitUnit:getCategory()
|
||||
InitCategory = InitUnit:getDesc().category
|
||||
InitType = InitUnit:getTypeName()
|
||||
|
||||
InitUnitCoalition = _SCORINGCoalition[InitCoalition]
|
||||
InitUnitCategory = _SCORINGCategory[InitCategory]
|
||||
InitUnitType = InitType
|
||||
|
||||
self:T( { InitUnitName, InitGroupName, InitPlayerName, InitCoalition, InitCategory, InitType , InitUnitCoalition, InitUnitCategory, InitUnitType } )
|
||||
end
|
||||
|
||||
|
||||
if Event.TgtDCSUnit then
|
||||
|
||||
TargetUnit = Event.TgtDCSUnit
|
||||
TargetUnitName = Event.TgtDCSUnitName
|
||||
TargetGroup = Event.TgtDCSGroup
|
||||
TargetGroupName = Event.TgtDCSGroupName
|
||||
TargetPlayerName = TargetUnit:getPlayerName()
|
||||
|
||||
TargetCoalition = TargetUnit:getCoalition()
|
||||
--TODO: Workaround Client DCS Bug
|
||||
--TargetCategory = TargetUnit:getCategory()
|
||||
TargetCategory = TargetUnit:getDesc().category
|
||||
TargetType = TargetUnit:getTypeName()
|
||||
|
||||
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
||||
TargetUnitCategory = _SCORINGCategory[TargetCategory]
|
||||
TargetUnitType = TargetType
|
||||
|
||||
self:T( { TargetUnitName, TargetGroupName, TargetPlayerName, TargetCoalition, TargetCategory, TargetType, TargetUnitCoalition, TargetUnitCategory, TargetUnitType } )
|
||||
end
|
||||
|
||||
if InitPlayerName ~= nil then -- It is a player that is hitting something
|
||||
self:_AddPlayerFromUnit( InitUnit )
|
||||
if self.Players[InitPlayerName] then -- This should normally not happen, but i'll test it anyway.
|
||||
if TargetPlayerName ~= nil then -- It is a player hitting another player ...
|
||||
self:_AddPlayerFromUnit( TargetUnit )
|
||||
self.Players[InitPlayerName].HitPlayers = self.Players[InitPlayerName].HitPlayers + 1
|
||||
end
|
||||
|
||||
self:T( "Hitting Something" )
|
||||
-- What is he hitting?
|
||||
if TargetCategory then
|
||||
if not self.Players[InitPlayerName].Hit[TargetCategory] then
|
||||
self.Players[InitPlayerName].Hit[TargetCategory] = {}
|
||||
end
|
||||
if not self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName] then
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName] = {}
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit = 0
|
||||
end
|
||||
local Score = 0
|
||||
if InitCoalition == TargetCoalition then
|
||||
self.Players[InitPlayerName].Penalty = self.Players[InitPlayerName].Penalty + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit + 1
|
||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit .. " times. Penalty: -" .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty ..
|
||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||
"",
|
||||
2,
|
||||
"/PENALTY" .. InitPlayerName .. "/" .. InitUnitName
|
||||
):ToAll()
|
||||
self:ScoreCSV( InitPlayerName, "HIT_PENALTY", 1, -25, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
self.Players[InitPlayerName].Score = self.Players[InitPlayerName].Score + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score + 1
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit + 1
|
||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit .. " times. Score: " .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score ..
|
||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||
"",
|
||||
2,
|
||||
"/SCORE" .. InitPlayerName .. "/" .. InitUnitName
|
||||
):ToAll()
|
||||
self:ScoreCSV( InitPlayerName, "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif InitPlayerName == nil then -- It is an AI hitting a player???
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SCORING:ReportScoreAll()
|
||||
|
||||
env.info( "Hello World " )
|
||||
|
||||
local ScoreMessage = ""
|
||||
local PlayerMessage = ""
|
||||
|
||||
self:T( "Score Report" )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Score Player: " .. PlayerName )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitCoalition = _SCORINGCoalition[PlayerData.UnitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[PlayerData.UnitCategory]
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
|
||||
local PlayerScore = 0
|
||||
local PlayerPenalty = 0
|
||||
|
||||
ScoreMessage = ":\n"
|
||||
|
||||
local ScoreMessageHits = ""
|
||||
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( CategoryName )
|
||||
if PlayerData.Hit[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreHit = 0
|
||||
local Penalty = 0
|
||||
local PenaltyHit = 0
|
||||
self:T( "Hit scores exist for player " .. PlayerName )
|
||||
for UnitName, UnitData in pairs( PlayerData.Hit[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreHit = ScoreHit + UnitData.ScoreHit
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyHit = UnitData.PenaltyHit
|
||||
end
|
||||
local ScoreMessageHit = string.format( "%s:%d ", CategoryName, Score - Penalty )
|
||||
self:T( ScoreMessageHit )
|
||||
ScoreMessageHits = ScoreMessageHits .. ScoreMessageHit
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageHits = ScoreMessageHits .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageHits ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Hits: " .. ScoreMessageHits .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageKills = ""
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( "Kill scores exist for player " .. PlayerName )
|
||||
if PlayerData.Kill[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreKill = 0
|
||||
local Penalty = 0
|
||||
local PenaltyKill = 0
|
||||
|
||||
for UnitName, UnitData in pairs( PlayerData.Kill[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreKill = ScoreKill + UnitData.ScoreKill
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyKill = PenaltyKill + UnitData.PenaltyKill
|
||||
end
|
||||
|
||||
local ScoreMessageKill = string.format( " %s:%d ", CategoryName, Score - Penalty )
|
||||
self:T( ScoreMessageKill )
|
||||
ScoreMessageKills = ScoreMessageKills .. ScoreMessageKill
|
||||
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageKills = ScoreMessageKills .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageKills ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Kills: " .. ScoreMessageKills .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageCoalitionChangePenalties = ""
|
||||
if PlayerData.PenaltyCoalition ~= 0 then
|
||||
ScoreMessageCoalitionChangePenalties = ScoreMessageCoalitionChangePenalties .. string.format( " -%d (%d changed)", PlayerData.Penalty, PlayerData.PenaltyCoalition )
|
||||
PlayerPenalty = PlayerPenalty + PlayerData.Penalty
|
||||
end
|
||||
if ScoreMessageCoalitionChangePenalties ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Coalition Penalties: " .. ScoreMessageCoalitionChangePenalties .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageMission = ""
|
||||
local ScoreMission = 0
|
||||
local ScoreTask = 0
|
||||
for MissionName, MissionData in pairs( PlayerData.Mission ) do
|
||||
ScoreMission = ScoreMission + MissionData.ScoreMission
|
||||
ScoreTask = ScoreTask + MissionData.ScoreTask
|
||||
ScoreMessageMission = ScoreMessageMission .. "'" .. MissionName .. "'; "
|
||||
end
|
||||
PlayerScore = PlayerScore + ScoreMission + ScoreTask
|
||||
|
||||
if ScoreMessageMission ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Tasks: " .. ScoreTask .. " Mission: " .. ScoreMission .. " ( " .. ScoreMessageMission .. ")\n"
|
||||
end
|
||||
|
||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score:%d (%d Score -%d Penalties)%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||
end
|
||||
end
|
||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
||||
end
|
||||
|
||||
|
||||
function SCORING:ReportScorePlayer()
|
||||
|
||||
env.info( "Hello World " )
|
||||
|
||||
local ScoreMessage = ""
|
||||
local PlayerMessage = ""
|
||||
|
||||
self:T( "Score Report" )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Score Player: " .. PlayerName )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitCoalition = _SCORINGCoalition[PlayerData.UnitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[PlayerData.UnitCategory]
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
|
||||
local PlayerScore = 0
|
||||
local PlayerPenalty = 0
|
||||
|
||||
ScoreMessage = ""
|
||||
|
||||
local ScoreMessageHits = ""
|
||||
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( CategoryName )
|
||||
if PlayerData.Hit[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreHit = 0
|
||||
local Penalty = 0
|
||||
local PenaltyHit = 0
|
||||
self:T( "Hit scores exist for player " .. PlayerName )
|
||||
for UnitName, UnitData in pairs( PlayerData.Hit[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreHit = ScoreHit + UnitData.ScoreHit
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyHit = UnitData.PenaltyHit
|
||||
end
|
||||
local ScoreMessageHit = string.format( "\n %s = %d score(%d;-%d) hits(#%d;#-%d)", CategoryName, Score - Penalty, Score, Penalty, ScoreHit, PenaltyHit )
|
||||
self:T( ScoreMessageHit )
|
||||
ScoreMessageHits = ScoreMessageHits .. ScoreMessageHit
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageHits = ScoreMessageHits .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageHits ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Hits: " .. ScoreMessageHits .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageKills = ""
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( "Kill scores exist for player " .. PlayerName )
|
||||
if PlayerData.Kill[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreKill = 0
|
||||
local Penalty = 0
|
||||
local PenaltyKill = 0
|
||||
|
||||
for UnitName, UnitData in pairs( PlayerData.Kill[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreKill = ScoreKill + UnitData.ScoreKill
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyKill = PenaltyKill + UnitData.PenaltyKill
|
||||
end
|
||||
|
||||
local ScoreMessageKill = string.format( "\n %s = %d score(%d;-%d) hits(#%d;#-%d)", CategoryName, Score - Penalty, Score, Penalty, ScoreKill, PenaltyKill )
|
||||
self:T( ScoreMessageKill )
|
||||
ScoreMessageKills = ScoreMessageKills .. ScoreMessageKill
|
||||
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageKills = ScoreMessageKills .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageKills ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Kills: " .. ScoreMessageKills .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageCoalitionChangePenalties = ""
|
||||
if PlayerData.PenaltyCoalition ~= 0 then
|
||||
ScoreMessageCoalitionChangePenalties = ScoreMessageCoalitionChangePenalties .. string.format( " -%d (%d changed)", PlayerData.Penalty, PlayerData.PenaltyCoalition )
|
||||
PlayerPenalty = PlayerPenalty + PlayerData.Penalty
|
||||
end
|
||||
if ScoreMessageCoalitionChangePenalties ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Coalition: " .. ScoreMessageCoalitionChangePenalties .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageMission = ""
|
||||
local ScoreMission = 0
|
||||
local ScoreTask = 0
|
||||
for MissionName, MissionData in pairs( PlayerData.Mission ) do
|
||||
ScoreMission = ScoreMission + MissionData.ScoreMission
|
||||
ScoreTask = ScoreTask + MissionData.ScoreTask
|
||||
ScoreMessageMission = ScoreMessageMission .. "'" .. MissionName .. "'; "
|
||||
end
|
||||
PlayerScore = PlayerScore + ScoreMission + ScoreTask
|
||||
|
||||
if ScoreMessageMission ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Tasks: " .. ScoreTask .. " Mission: " .. ScoreMission .. " ( " .. ScoreMessageMission .. ") "
|
||||
end
|
||||
|
||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score = %d ( %d Score, -%d Penalties ):%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||
end
|
||||
end
|
||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
||||
|
||||
end
|
||||
|
||||
|
||||
function SCORING:SecondsToClock(sSeconds)
|
||||
local nSeconds = sSeconds
|
||||
if nSeconds == 0 then
|
||||
--return nil;
|
||||
return "00:00:00";
|
||||
else
|
||||
nHours = string.format("%02.f", math.floor(nSeconds/3600));
|
||||
nMins = string.format("%02.f", math.floor(nSeconds/60 - (nHours*60)));
|
||||
nSecs = string.format("%02.f", math.floor(nSeconds - nHours*3600 - nMins *60));
|
||||
return nHours..":"..nMins..":"..nSecs
|
||||
end
|
||||
end
|
||||
|
||||
--- Opens a score CSV file to log the scores.
|
||||
-- @param #SCORING self
|
||||
-- @param #string ScoringCSV
|
||||
-- @return #SCORING self
|
||||
-- @usage
|
||||
-- -- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
|
||||
-- ScoringObject = SCORING:New( "Gori Valley" )
|
||||
-- ScoringObject:OpenCSV( "Player Scores" )
|
||||
function SCORING:OpenCSV( ScoringCSV )
|
||||
self:F( ScoringCSV )
|
||||
|
||||
if lfs and io and os then
|
||||
if ScoringCSV then
|
||||
self.ScoringCSV = ScoringCSV
|
||||
local fdir = lfs.writedir() .. [[Logs\]] .. self.ScoringCSV .. " " .. os.date( "%Y-%m-%d %H-%M-%S" ) .. ".csv"
|
||||
|
||||
self.CSVFile, self.err = io.open( fdir, "w+" )
|
||||
if not self.CSVFile then
|
||||
error( "Error: Cannot open CSV file in " .. lfs.writedir() )
|
||||
end
|
||||
|
||||
self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
|
||||
|
||||
self.RunTime = os.date("%y-%m-%d_%H-%M-%S")
|
||||
else
|
||||
error( "A string containing the CSV file name must be given." )
|
||||
end
|
||||
else
|
||||
self:E( "The MissionScripting.lua file has not been changed to allow lfs, io and os modules to be used..." )
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Registers a score for a player.
|
||||
-- @param #SCORING self
|
||||
-- @param #string PlayerName The name of the player.
|
||||
-- @param #string ScoreType The type of the score.
|
||||
-- @param #string ScoreTimes The amount of scores achieved.
|
||||
-- @param #string ScoreAmount The score given.
|
||||
-- @param #string PlayerUnitName The unit name of the player.
|
||||
-- @param #string PlayerUnitCoalition The coalition of the player unit.
|
||||
-- @param #string PlayerUnitCategory The category of the player unit.
|
||||
-- @param #string PlayerUnitType The type of the player unit.
|
||||
-- @param #string TargetUnitName The name of the target unit.
|
||||
-- @param #string TargetUnitCoalition The coalition of the target unit.
|
||||
-- @param #string TargetUnitCategory The category of the target unit.
|
||||
-- @param #string TargetUnitType The type of the target unit.
|
||||
-- @return #SCORING self
|
||||
function SCORING:ScoreCSV( PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
--write statistic information to file
|
||||
local ScoreTime = self:SecondsToClock( timer.getTime() )
|
||||
PlayerName = PlayerName:gsub( '"', '_' )
|
||||
|
||||
if PlayerUnitName and PlayerUnitName ~= '' then
|
||||
local PlayerUnit = Unit.getByName( PlayerUnitName )
|
||||
|
||||
if PlayerUnit then
|
||||
if not PlayerUnitCategory then
|
||||
--PlayerUnitCategory = SCORINGCategory[PlayerUnit:getCategory()]
|
||||
PlayerUnitCategory = _SCORINGCategory[PlayerUnit:getDesc().category]
|
||||
end
|
||||
|
||||
if not PlayerUnitCoalition then
|
||||
PlayerUnitCoalition = _SCORINGCoalition[PlayerUnit:getCoalition()]
|
||||
end
|
||||
|
||||
if not PlayerUnitType then
|
||||
PlayerUnitType = PlayerUnit:getTypeName()
|
||||
end
|
||||
else
|
||||
PlayerUnitName = ''
|
||||
PlayerUnitCategory = ''
|
||||
PlayerUnitCoalition = ''
|
||||
PlayerUnitType = ''
|
||||
end
|
||||
else
|
||||
PlayerUnitName = ''
|
||||
PlayerUnitCategory = ''
|
||||
PlayerUnitCoalition = ''
|
||||
PlayerUnitType = ''
|
||||
end
|
||||
|
||||
if not TargetUnitCoalition then
|
||||
TargetUnitCoalition = ''
|
||||
end
|
||||
|
||||
if not TargetUnitCategory then
|
||||
TargetUnitCategory = ''
|
||||
end
|
||||
|
||||
if not TargetUnitType then
|
||||
TargetUnitType = ''
|
||||
end
|
||||
|
||||
if not TargetUnitName then
|
||||
TargetUnitName = ''
|
||||
end
|
||||
|
||||
if lfs and io and os then
|
||||
self.CSVFile:write(
|
||||
'"' .. self.GameName .. '"' .. ',' ..
|
||||
'"' .. self.RunTime .. '"' .. ',' ..
|
||||
'' .. ScoreTime .. '' .. ',' ..
|
||||
'"' .. PlayerName .. '"' .. ',' ..
|
||||
'"' .. ScoreType .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitCoalition .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitCategory .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitType .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitName .. '"' .. ',' ..
|
||||
'"' .. TargetUnitCoalition .. '"' .. ',' ..
|
||||
'"' .. TargetUnitCategory .. '"' .. ',' ..
|
||||
'"' .. TargetUnitType .. '"' .. ',' ..
|
||||
'"' .. TargetUnitName .. '"' .. ',' ..
|
||||
'' .. ScoreTimes .. '' .. ',' ..
|
||||
'' .. ScoreAmount
|
||||
)
|
||||
|
||||
self.CSVFile:write( "\n" )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SCORING:CloseCSV()
|
||||
if lfs and io and os then
|
||||
self.CSVFile:close()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
-- @author (co) Flightcontrol (Modified and enriched with functionality)
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Event" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Mission" )
|
||||
Include.File( "Client" )
|
||||
@@ -42,32 +43,31 @@ function SEAD:New( SEADGroupPrefixes )
|
||||
else
|
||||
self.SEADGroupNames[SEADGroupPrefixes] = SEADGroupPrefixes
|
||||
end
|
||||
self:AddEvent( world.event.S_EVENT_SHOT, self.EventShot )
|
||||
self:EnableEvents()
|
||||
_EVENTDISPATCHER:OnShot( self.EventShot, self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME.
|
||||
-- @see SEAD
|
||||
function SEAD:EventShot( event )
|
||||
self:F( { event } )
|
||||
function SEAD:EventShot( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local SEADUnit = event.initiator
|
||||
local SEADUnitName = SEADUnit:getName()
|
||||
local SEADWeapon = event.weapon -- Identify the weapon fired
|
||||
local SEADWeaponName = SEADWeapon:getTypeName() -- return weapon type
|
||||
local SEADUnit = Event.IniDCSUnit
|
||||
local SEADUnitName = Event.IniDCSUnitName
|
||||
local SEADWeapon = Event.Weapon -- Identify the weapon fired
|
||||
local SEADWeaponName = Event.WeaponName -- return weapon type
|
||||
--trigger.action.outText( string.format("Alerte, depart missile " ..string.format(SEADWeaponName)), 20) --debug message
|
||||
-- Start of the 2nd loop
|
||||
self:T( "Missile Launched = " .. SEADWeaponName )
|
||||
if SEADWeaponName == "KH-58" or SEADWeaponName == "KH-25MPU" or SEADWeaponName == "AGM-88" or SEADWeaponName == "KH-31A" or SEADWeaponName == "KH-31P" then -- Check if the missile is a SEAD
|
||||
local _evade = math.random (1,100) -- random number for chance of evading action
|
||||
local _targetMim = Weapon.getTarget(SEADWeapon) -- Identify target
|
||||
local _targetMim = Event.Weapon:getTarget() -- Identify target
|
||||
local _targetMimname = Unit.getName(_targetMim)
|
||||
local _targetMimgroup = Unit.getGroup(Weapon.getTarget(SEADWeapon))
|
||||
local _targetMimgroupName = _targetMimgroup:getName()
|
||||
local _targetMimcont= _targetMimgroup:getController()
|
||||
local _targetskill = _Database.Units[_targetMimname].Template.skill
|
||||
local _targetskill = _DATABASE.Templates.Units[_targetMimname].Template.skill
|
||||
self:T( self.SEADGroupPrefixes )
|
||||
self:T( _targetMimgroupName )
|
||||
local SEADGroupFound = false
|
||||
|
||||
269
Moose/Spawn.lua
269
Moose/Spawn.lua
@@ -1,5 +1,8 @@
|
||||
--- Dynamic spawning of groups (and units).
|
||||
-- The SPAWN class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
--
|
||||
-- @{#SPAWN} class
|
||||
-- ===============
|
||||
-- The @{#SPAWN} class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
-- For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the *"Spawn Template"* of the SPAWN object.
|
||||
-- A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods.
|
||||
--
|
||||
@@ -21,8 +24,8 @@
|
||||
-- * It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.
|
||||
-- * When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.
|
||||
--
|
||||
-- 1. SPAWN object construction methods:
|
||||
-- -------------------------------------
|
||||
-- SPAWN construction methods:
|
||||
-- ===========================
|
||||
-- Create a new SPAWN object with the @{#SPAWN.New} or the @{#SPAWN.NewWithAlias} methods:
|
||||
--
|
||||
-- * @{#SPAWN.New}: Creates a new SPAWN object taking the name of the group that functions as the Template.
|
||||
@@ -31,8 +34,8 @@
|
||||
-- The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
|
||||
-- So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.
|
||||
--
|
||||
-- 2. SPAWN object initialization methods:
|
||||
-- ---------------------------------------
|
||||
-- SPAWN initialization methods:
|
||||
-- =============================
|
||||
-- A spawn object will behave differently based on the usage of initialization methods:
|
||||
--
|
||||
-- * @{#SPAWN.Limit}: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
|
||||
@@ -40,10 +43,10 @@
|
||||
-- * @{#SPAWN.RandomizeTemplate}: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.
|
||||
-- * @{#SPAWN.Uncontrolled}: Spawn plane groups uncontrolled.
|
||||
-- * @{#SPAWN.Array}: Make groups visible before they are actually activated, and order these groups like a batallion in an array.
|
||||
-- * @{#SPAWN.Repeat}: Re-spawn groups when they land at the home base. Similar functions are @{#SPAWN.RepeatOnLanding} and @{#SPAWN.RepeatOnEngineShutDown}.
|
||||
-- * @{#SPAWN.InitRepeat}: Re-spawn groups when they land at the home base. Similar functions are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
|
||||
--
|
||||
-- 2. SPAWN object spawning methods:
|
||||
-- ---------------------------------
|
||||
-- SPAWN spawning methods:
|
||||
-- =======================
|
||||
-- Groups can be spawned at different times and methods:
|
||||
--
|
||||
-- * @{#SPAWN.Spawn}: Spawn one new group based on the last spawned index.
|
||||
@@ -55,8 +58,8 @@
|
||||
-- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object.
|
||||
-- You can use the @{GROUP} object to do further actions with the DCSGroup.
|
||||
--
|
||||
-- 3. SPAWN object cleaning:
|
||||
-- -------------------------
|
||||
-- SPAWN object cleaning:
|
||||
-- =========================
|
||||
-- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
-- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
-- and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
@@ -67,6 +70,7 @@
|
||||
-- This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
-- Check the @{#SPAWN.CleanUp} for further info.
|
||||
--
|
||||
-- ====
|
||||
-- @module Spawn
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -75,6 +79,8 @@ Include.File( "Base" )
|
||||
Include.File( "Database" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Zone" )
|
||||
Include.File( "Event" )
|
||||
Include.File( "Scheduler" )
|
||||
|
||||
--- SPAWN Class
|
||||
-- @type SPAWN
|
||||
@@ -110,7 +116,7 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.AliveUnits = 0 -- Contains the counter how many units are currently alive
|
||||
self.SpawnIsScheduled = false -- Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.
|
||||
self.SpawnTemplate = self._GetTemplate( self, SpawnTemplatePrefix ) -- Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!
|
||||
self.SpawnRepeat = false -- Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
|
||||
self.Repeat = false -- Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
|
||||
self.UnControlled = false -- When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.
|
||||
self.SpawnMaxUnitsAlive = 0 -- The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
@@ -121,12 +127,6 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
else
|
||||
error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -153,7 +153,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.AliveUnits = 0 -- Contains the counter how many units are currently alive
|
||||
self.SpawnIsScheduled = false -- Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.
|
||||
self.SpawnTemplate = self._GetTemplate( self, SpawnTemplatePrefix ) -- Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!
|
||||
self.SpawnRepeat = false -- Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
|
||||
self.Repeat = false -- Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.
|
||||
self.UnControlled = false -- When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.
|
||||
self.SpawnMaxUnitsAlive = 0 -- The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.
|
||||
self.SpawnMaxGroups = 0 -- The maximum amount of groups that can be spawned.
|
||||
@@ -165,12 +165,6 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -281,41 +275,37 @@ end
|
||||
-- -- RU Su-34 - AI Ship Attack
|
||||
-- -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
|
||||
-- SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()
|
||||
function SPAWN:Repeat()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
function SPAWN:InitRepeat()
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnIndex } )
|
||||
|
||||
self.SpawnRepeat = true
|
||||
self.Repeat = true
|
||||
self.RepeatOnEngineShutDown = false
|
||||
self.RepeatOnLanding = true
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_LAND, self._OnLand )
|
||||
self:AddEvent( world.event.S_EVENT_TAKEOFF, self._OnTakeOff )
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._OnEngineShutDown )
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Same as the @{Repeat) method.
|
||||
-- @return SPAWN
|
||||
-- @see Repeat
|
||||
|
||||
function SPAWN:RepeatOnLanding()
|
||||
--- Respawn group after landing.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:InitRepeatOnLanding()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self:Repeat()
|
||||
self:InitRepeat()
|
||||
self.RepeatOnEngineShutDown = false
|
||||
self.RepeatOnLanding = true
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Same as the @{#SPAWN.Repeat) method, but now the Group will respawn after its engines have shut down.
|
||||
-- @return SPAWN
|
||||
function SPAWN:RepeatOnEngineShutDown()
|
||||
|
||||
--- Respawn after landing when its engines have shut down.
|
||||
-- @param #SPAWN self
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:InitRepeatOnEngineShutDown()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self:Repeat()
|
||||
self:InitRepeat()
|
||||
self.RepeatOnEngineShutDown = true
|
||||
self.RepeatOnLanding = false
|
||||
|
||||
@@ -334,8 +324,8 @@ function SPAWN:CleanUp( SpawnCleanUpInterval )
|
||||
|
||||
self.SpawnCleanUpInterval = SpawnCleanUpInterval
|
||||
self.SpawnCleanUpTimeStamps = {}
|
||||
self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
|
||||
|
||||
--self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
|
||||
self.CleanUpScheduler = SCHEDULER:New( self, self._SpawnCleanUpScheduler, {}, 1, SpawnCleanUpInterval, 0.2 )
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -385,7 +375,20 @@ function SPAWN:Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY )
|
||||
self.SpawnGroups[SpawnGroupID].SpawnTemplate.visible = true
|
||||
|
||||
self.SpawnGroups[SpawnGroupID].Visible = true
|
||||
self.SpawnGroups[SpawnGroupID].Group = _Database:Spawn( self.SpawnGroups[SpawnGroupID].SpawnTemplate )
|
||||
|
||||
_EVENTDISPATCHER:OnBirthForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnBirth, self )
|
||||
_EVENTDISPATCHER:OnCrashForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
|
||||
if self.Repeat then
|
||||
_EVENTDISPATCHER:OnTakeOffForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnTakeOff, self )
|
||||
_EVENTDISPATCHER:OnLandForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnLand, self )
|
||||
end
|
||||
if self.RepeatOnEngineShutDown then
|
||||
_EVENTDISPATCHER:OnEngineShutDownForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnEngineShutDown, self )
|
||||
end
|
||||
|
||||
self.SpawnGroups[SpawnGroupID].Group = _DATABASE:Spawn( self.SpawnGroups[SpawnGroupID].SpawnTemplate )
|
||||
|
||||
SpawnX = SpawnXIndex * SpawnDeltaX
|
||||
SpawnY = SpawnYIndex * SpawnDeltaY
|
||||
@@ -419,13 +422,13 @@ function SPAWN:ReSpawn( SpawnIndex )
|
||||
end
|
||||
|
||||
-- TODO: This logic makes DCS crash and i don't know why (yet).
|
||||
-- local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
|
||||
-- if SpawnGroup then
|
||||
-- local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
|
||||
-- if SpawnDCSGroup then
|
||||
-- SpawnGroup:Destroy()
|
||||
-- end
|
||||
-- end
|
||||
local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
|
||||
if SpawnGroup then
|
||||
local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
|
||||
if SpawnDCSGroup then
|
||||
SpawnGroup:Destroy()
|
||||
end
|
||||
end
|
||||
|
||||
return self:SpawnWithIndex( SpawnIndex )
|
||||
end
|
||||
@@ -443,22 +446,36 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
self.SpawnGroups[self.SpawnIndex].Group:Activate()
|
||||
else
|
||||
self:T( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _Database:Spawn( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
_EVENTDISPATCHER:OnBirthForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnBirth, self )
|
||||
_EVENTDISPATCHER:OnCrashForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
|
||||
if self.Repeat then
|
||||
_EVENTDISPATCHER:OnTakeOffForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnTakeOff, self )
|
||||
_EVENTDISPATCHER:OnLandForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnLand, self )
|
||||
end
|
||||
if self.RepeatOnEngineShutDown then
|
||||
_EVENTDISPATCHER:OnEngineShutDownForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnEngineShutDown, self )
|
||||
end
|
||||
|
||||
self:T( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
if self.SpawnFunctionHook then
|
||||
self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
|
||||
end
|
||||
-- TODO: Need to fix this by putting an "R" in the name of the group when the group repeats.
|
||||
--if self.SpawnRepeat then
|
||||
-- _Database:SetStatusGroup( SpawnTemplate.name, "ReSpawn" )
|
||||
--if self.Repeat then
|
||||
-- _DATABASE:SetStatusGroup( SpawnTemplate.name, "ReSpawn" )
|
||||
--end
|
||||
end
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Spawned = true
|
||||
return self.SpawnGroups[self.SpawnIndex].Group
|
||||
else
|
||||
self:E( { self.SpawnTemplatePrefix, "No more Groups to Spawn:", SpawnIndex, self.SpawnMaxGroups } )
|
||||
--self:E( { self.SpawnTemplatePrefix, "No more Groups to Spawn:", SpawnIndex, self.SpawnMaxGroups } )
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -483,23 +500,29 @@ end
|
||||
function SPAWN:SpawnScheduled( SpawnTime, SpawnTimeVariation )
|
||||
self:F( { SpawnTime, SpawnTimeVariation } )
|
||||
|
||||
self.SpawnCurrentTimer = 0 -- The internal timer counter to trigger a scheduled spawning of SpawnTemplatePrefix.
|
||||
self.SpawnSetTimer = 0 -- The internal timer value when a scheduled spawning of SpawnTemplatePrefix occurs.
|
||||
self.AliveFactor = 1 --
|
||||
self.SpawnLowTimer = 0
|
||||
self.SpawnHighTimer = 0
|
||||
|
||||
if SpawnTime ~= nil and SpawnTimeVariation ~= nil then
|
||||
self.SpawnLowTimer = SpawnTime - SpawnTime / 2 * SpawnTimeVariation
|
||||
self.SpawnHighTimer = SpawnTime + SpawnTime / 2 * SpawnTimeVariation
|
||||
self:SpawnScheduleStart()
|
||||
self.SpawnScheduler = SCHEDULER:New( self, self._Scheduler, {}, 1, SpawnTime, SpawnTimeVariation )
|
||||
end
|
||||
|
||||
self:T( { self.SpawnLowTimer, self.SpawnHighTimer } )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Will re-start the spawning scheduler.
|
||||
-- Note: This function is only required to be called when the schedule was stopped.
|
||||
function SPAWN:SpawnScheduleStart()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self.SpawnScheduler:Start()
|
||||
end
|
||||
|
||||
--- Will stop the scheduled spawning scheduler.
|
||||
function SPAWN:SpawnScheduleStop()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self.SpawnScheduler:Stop()
|
||||
end
|
||||
|
||||
|
||||
--- Allows to place a CallFunction hook when a new group spawns.
|
||||
-- The provided function will be called when a new group is spawned, including its given parameters.
|
||||
-- The first parameter of the SpawnFunction is the @{Group#GROUP} that was spawned.
|
||||
@@ -521,30 +544,6 @@ end
|
||||
|
||||
|
||||
|
||||
--- Will start the spawning scheduler.
|
||||
-- Note: This function is called automatically when @{#SPAWN.Scheduled} is called.
|
||||
function SPAWN:SpawnScheduleStart()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
--local ClientUnit = #AlivePlayerUnits()
|
||||
|
||||
self.AliveFactor = 10 -- ( 10 - ClientUnit ) / 10
|
||||
|
||||
if self.SpawnIsScheduled == false then
|
||||
self.SpawnIsScheduled = true
|
||||
self.SpawnInit = true
|
||||
self.SpawnSetTimer = math.random( self.SpawnLowTimer * self.AliveFactor / 10 , self.SpawnHighTimer * self.AliveFactor / 10 )
|
||||
|
||||
self.SpawnFunction = routines.scheduleFunction( self._Scheduler, { self }, timer.getTime() + 1, 1 )
|
||||
end
|
||||
end
|
||||
|
||||
--- Will stop the scheduled spawning scheduler.
|
||||
function SPAWN:SpawnScheduleStop()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
|
||||
self.SpawnIsScheduled = false
|
||||
end
|
||||
|
||||
--- Will spawn a group from a hosting unit. This function is mostly advisable to be used if you want to simulate spawning from air units, like helicopters, which are dropping infantry into a defined Landing Zone.
|
||||
-- Note that each point in the route assigned to the spawning group is reset to the point of the spawn.
|
||||
@@ -573,6 +572,9 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
||||
if SpawnTemplate then
|
||||
|
||||
local UnitPoint = HostUnit:GetPointVec2()
|
||||
|
||||
self:T( { "Current point of ", self.SpawnTemplatePrefix, UnitPoint } )
|
||||
|
||||
--for PointID, Point in pairs( SpawnTemplate.route.points ) do
|
||||
--Point.x = UnitPoint.x
|
||||
--Point.y = UnitPoint.y
|
||||
@@ -580,9 +582,6 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
||||
--Point.alt_type = nil
|
||||
--end
|
||||
|
||||
SpawnTemplate.route.points = nil
|
||||
SpawnTemplate.route.points = {}
|
||||
SpawnTemplate.route.points[1] = {}
|
||||
SpawnTemplate.route.points[1].x = UnitPoint.x
|
||||
SpawnTemplate.route.points[1].y = UnitPoint.y
|
||||
|
||||
@@ -625,14 +624,17 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Will spawn a Group within a given @{ZONE}.
|
||||
--- Will spawn a Group within a given @{Zone#ZONE}.
|
||||
-- Once the group is spawned within the zone, it will continue on its route.
|
||||
-- The first waypoint (where the group is spawned) is replaced with the zone coordinates.
|
||||
-- @param #SPAWN self
|
||||
-- @param #ZONE Zone The zone where the group is to be spawned.
|
||||
-- @param Zone#ZONE Zone The zone where the group is to be spawned.
|
||||
-- @param #number ZoneRandomize (Optional) Set to true if you want to randomize the starting point in the zone.
|
||||
-- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone.
|
||||
-- @return Group#GROUP that was spawned.
|
||||
-- @return #nil when nothing was spawned.
|
||||
function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } )
|
||||
function SPAWN:SpawnInZone( Zone, ZoneRandomize, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, ZoneRandomize, SpawnIndex } )
|
||||
|
||||
if Zone then
|
||||
|
||||
@@ -647,31 +649,25 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
||||
|
||||
if SpawnTemplate then
|
||||
|
||||
local ZonePoint = Zone:GetPointVec2()
|
||||
local ZonePoint
|
||||
|
||||
if ZoneRandomize == true then
|
||||
ZonePoint = Zone:GetRandomPointVec2()
|
||||
else
|
||||
ZonePoint = Zone:GetPointVec2()
|
||||
end
|
||||
|
||||
SpawnTemplate.route.points = nil
|
||||
SpawnTemplate.route.points = {}
|
||||
SpawnTemplate.route.points[1] = {}
|
||||
SpawnTemplate.route.points[1].x = ZonePoint.x
|
||||
SpawnTemplate.route.points[1].y = ZonePoint.y
|
||||
|
||||
-- Apply SpawnFormation
|
||||
for UnitID = 1, #SpawnTemplate.units do
|
||||
SpawnTemplate.units[UnitID].x = ZonePoint.x
|
||||
SpawnTemplate.units[UnitID].y = ZonePoint.y
|
||||
local ZonePointUnit = Zone:GetRandomPointVec2()
|
||||
SpawnTemplate.units[UnitID].x = ZonePointUnit.x
|
||||
SpawnTemplate.units[UnitID].y = ZonePointUnit.y
|
||||
self:T( 'SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
|
||||
end
|
||||
|
||||
local SpawnPos = Zone:GetRandomPointVec2()
|
||||
local Point = {}
|
||||
Point.type = "Turning Point"
|
||||
Point.x = SpawnPos.x
|
||||
Point.y = SpawnPos.y
|
||||
Point.action = "Cone"
|
||||
Point.speed = 5
|
||||
|
||||
table.insert( SpawnTemplate.route.points, 2, Point )
|
||||
|
||||
|
||||
return self:SpawnWithIndex( self.SpawnIndex )
|
||||
end
|
||||
end
|
||||
@@ -682,6 +678,7 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Will spawn a plane group in uncontrolled mode...
|
||||
-- This will be similar to the uncontrolled flag setting in the ME.
|
||||
-- @return #SPAWN self
|
||||
@@ -896,7 +893,6 @@ function SPAWN:_InitializeSpawnGroups( SpawnIndex )
|
||||
self.SpawnGroups[SpawnIndex].Visible = false
|
||||
self.SpawnGroups[SpawnIndex].Spawned = false
|
||||
self.SpawnGroups[SpawnIndex].UnControlled = false
|
||||
self.SpawnGroups[SpawnIndex].Spawned = false
|
||||
self.SpawnGroups[SpawnIndex].SpawnTime = 0
|
||||
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplatePrefix = self.SpawnTemplatePrefix
|
||||
@@ -950,12 +946,15 @@ end
|
||||
|
||||
--- Gets the Group Template from the ME environment definition.
|
||||
-- This method used the @{DATABASE} object, which contains ALL initial and new spawned object in MOOSE.
|
||||
-- @param #SPAWN self
|
||||
-- @param #string SpawnTemplatePrefix
|
||||
-- @return @SPAWN self
|
||||
function SPAWN:_GetTemplate( SpawnTemplatePrefix )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } )
|
||||
|
||||
local SpawnTemplate = nil
|
||||
|
||||
SpawnTemplate = routines.utils.deepCopy( _Database.Groups[SpawnTemplatePrefix].Template )
|
||||
SpawnTemplate = routines.utils.deepCopy( _DATABASE.Templates.Groups[SpawnTemplatePrefix].Template )
|
||||
|
||||
if SpawnTemplate == nil then
|
||||
error( 'No Template returned for SpawnTemplatePrefix = ' .. SpawnTemplatePrefix )
|
||||
@@ -970,6 +969,10 @@ function SPAWN:_GetTemplate( SpawnTemplatePrefix )
|
||||
end
|
||||
|
||||
--- Prepares the new Group Template.
|
||||
-- @param #SPAWN self
|
||||
-- @param #string SpawnTemplatePrefix
|
||||
-- @param #number SpawnIndex
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } )
|
||||
|
||||
@@ -980,6 +983,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
SpawnTemplate.lateActivation = false
|
||||
|
||||
if SpawnTemplate.SpawnCategoryID == Group.Category.GROUND then
|
||||
self:T( "For ground units, visible needs to be false..." )
|
||||
SpawnTemplate.visible = false
|
||||
end
|
||||
|
||||
@@ -999,7 +1003,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
|
||||
end
|
||||
|
||||
--- Internal function randomizing the routes.
|
||||
--- Private method randomizing the routes.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number SpawnIndex The index of the group to be spawned.
|
||||
-- @return #SPAWN
|
||||
@@ -1023,7 +1027,10 @@ function SPAWN:_RandomizeRoute( SpawnIndex )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Private method that randomizes the template of the group.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number SpawnIndex
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:_RandomizeTemplate( SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, SpawnIndex } )
|
||||
|
||||
@@ -1033,6 +1040,7 @@ function SPAWN:_RandomizeTemplate( SpawnIndex )
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.route = routines.utils.deepCopy( self.SpawnTemplate.route )
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.x = self.SpawnTemplate.x
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.y = self.SpawnTemplate.y
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.start_time = self.SpawnTemplate.start_time
|
||||
for UnitID = 1, #self.SpawnGroups[SpawnIndex].SpawnTemplate.units do
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.units[UnitID].heading = self.SpawnTemplate.units[1].heading
|
||||
end
|
||||
@@ -1112,7 +1120,7 @@ function SPAWN:_GetSpawnIndex( SpawnIndex )
|
||||
end
|
||||
|
||||
|
||||
-- TODO Need to delete this... _Database does this now ...
|
||||
-- TODO Need to delete this... _DATABASE does this now ...
|
||||
function SPAWN:_OnBirth( event )
|
||||
|
||||
if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line
|
||||
@@ -1130,7 +1138,7 @@ function SPAWN:_OnBirth( event )
|
||||
end
|
||||
|
||||
--- Obscolete
|
||||
-- @todo Need to delete this... _Database does this now ...
|
||||
-- @todo Need to delete this... _DATABASE does this now ...
|
||||
function SPAWN:_OnDeadOrCrash( event )
|
||||
self:F( self.SpawnTemplatePrefix, event )
|
||||
|
||||
@@ -1215,19 +1223,10 @@ end
|
||||
function SPAWN:_Scheduler()
|
||||
self:F( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive } )
|
||||
|
||||
if self.SpawnInit or self.SpawnCurrentTimer == self.SpawnSetTimer then
|
||||
-- Validate if there are still groups left in the batch...
|
||||
self:Spawn()
|
||||
self.SpawnInit = false
|
||||
if self.SpawnIsScheduled == true then
|
||||
--local ClientUnit = #AlivePlayerUnits()
|
||||
self.AliveFactor = 1 -- ( 10 - ClientUnit ) / 10
|
||||
self.SpawnCurrentTimer = 0
|
||||
self.SpawnSetTimer = math.random( self.SpawnLowTimer * self.AliveFactor , self.SpawnHighTimer * self.AliveFactor )
|
||||
end
|
||||
else
|
||||
self.SpawnCurrentTimer = self.SpawnCurrentTimer + 1
|
||||
end
|
||||
-- Validate if there are still groups left in the batch...
|
||||
self:Spawn()
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SPAWN:_SpawnCleanUpScheduler()
|
||||
@@ -1259,4 +1258,6 @@ function SPAWN:_SpawnCleanUpScheduler()
|
||||
|
||||
end
|
||||
|
||||
return true -- Repeat
|
||||
|
||||
end
|
||||
|
||||
186
Moose/Stage.lua
186
Moose/Stage.lua
@@ -36,7 +36,7 @@ end
|
||||
function STAGE:Execute( Mission, Client, Task )
|
||||
|
||||
local Valid = true
|
||||
|
||||
|
||||
return Valid
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ end
|
||||
|
||||
function STAGE:Validate( Mission, Client, Task )
|
||||
local Valid = true
|
||||
|
||||
|
||||
return Valid
|
||||
end
|
||||
|
||||
@@ -255,7 +255,7 @@ function STAGEROUTE:Validate( Mission, Client, Task )
|
||||
|
||||
-- check if the Client is in the landing zone
|
||||
self:T( Task.LandingZones.LandingZoneNames )
|
||||
Task.CurrentLandingZoneName = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames )
|
||||
Task.CurrentLandingZoneName = routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames, 500 )
|
||||
|
||||
if Task.CurrentLandingZoneName then
|
||||
|
||||
@@ -268,9 +268,11 @@ function STAGEROUTE:Validate( Mission, Client, Task )
|
||||
end
|
||||
end
|
||||
|
||||
self:T( 1 )
|
||||
return 1
|
||||
end
|
||||
|
||||
self:T( 0 )
|
||||
return 0
|
||||
end
|
||||
|
||||
@@ -345,8 +347,17 @@ function STAGELANDING:Execute( Mission, Client, Task )
|
||||
else
|
||||
HostMessage = "Use the Radio menu and F6 to find the cargo, then fly or land near the cargo and " .. Task.TEXT[1] .. " " .. Task.CargoNames .. "."
|
||||
end
|
||||
|
||||
local Host = "Command"
|
||||
if Task.HostUnitName then
|
||||
Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")"
|
||||
else
|
||||
if Client:IsMultiSeated() then
|
||||
Host = "Co-Pilot"
|
||||
end
|
||||
end
|
||||
|
||||
Client:Message( HostMessage, self.MSG.TIME, Mission.Name .. "/STAGELANDING.EXEC." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")", 10 )
|
||||
Client:Message( HostMessage, self.MSG.TIME, Mission.Name .. "/STAGELANDING.EXEC." .. Host, Host, 10 )
|
||||
|
||||
end
|
||||
end
|
||||
@@ -354,7 +365,7 @@ end
|
||||
function STAGELANDING:Validate( Mission, Client, Task )
|
||||
self:F()
|
||||
|
||||
Task.CurrentLandingZoneName = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames )
|
||||
Task.CurrentLandingZoneName = routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames, 500 )
|
||||
if Task.CurrentLandingZoneName then
|
||||
|
||||
-- Client is in de landing zone.
|
||||
@@ -377,14 +388,34 @@ function STAGELANDING:Validate( Mission, Client, Task )
|
||||
end
|
||||
Task.Signalled = false
|
||||
Task:RemoveCargoMenus( Client )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
if Task.IsLandingRequired and Client:GetClientGroupDCSUnit():inAir() then
|
||||
return 0
|
||||
end
|
||||
|
||||
local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity()
|
||||
local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5
|
||||
|
||||
local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint()
|
||||
local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } )
|
||||
local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight
|
||||
|
||||
self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } )
|
||||
if Task.IsLandingRequired and not Client:GetClientGroupDCSUnit():inAir() then
|
||||
self:T( 1 )
|
||||
Task.IsInAirTestRequired = true
|
||||
return 1
|
||||
end
|
||||
|
||||
return 1
|
||||
self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } )
|
||||
if Task.IsLandingRequired and DCSUnitVelocity <= 0.05 and DCSUnitHeight <= Task.CurrentCargoZone.SignalHeight then
|
||||
self:T( 1 )
|
||||
Task.IsInAirTestRequired = false
|
||||
return 1
|
||||
end
|
||||
|
||||
self:T( 0 )
|
||||
return 0
|
||||
end
|
||||
|
||||
STAGELANDED = {
|
||||
@@ -405,9 +436,20 @@ function STAGELANDED:Execute( Mission, Client, Task )
|
||||
self:F()
|
||||
|
||||
if Task.IsLandingRequired then
|
||||
Client:Message( 'You have landed within the landing zone. Use the radio menu (F10) to ' .. Task.TEXT[1] .. ' the ' .. Task.CargoType .. '.',
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDED.EXEC." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
if not self.MenusAdded then
|
||||
|
||||
local Host = "Command"
|
||||
if Task.HostUnitName then
|
||||
Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")"
|
||||
else
|
||||
if Client:IsMultiSeated() then
|
||||
Host = "Co-Pilot"
|
||||
end
|
||||
end
|
||||
|
||||
Client:Message( 'You have landed within the landing zone. Use the radio menu (F10) to ' .. Task.TEXT[1] .. ' the ' .. Task.CargoType .. '.',
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDED.EXEC" .. Host, Host )
|
||||
|
||||
if not self.MenusAdded then
|
||||
Task.Cargo = nil
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Task:AddCargoMenus( Client, CARGOS, 250 )
|
||||
@@ -420,26 +462,44 @@ end
|
||||
function STAGELANDED:Validate( Mission, Client, Task )
|
||||
self:F()
|
||||
|
||||
if not routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then
|
||||
if not routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then
|
||||
self:T( "Client is not anymore in the landing zone, go back to stage Route, and remove cargo menus." )
|
||||
Task.Signalled = false
|
||||
Task:RemoveCargoMenus( Client )
|
||||
self:T( -2 )
|
||||
return -2
|
||||
end
|
||||
|
||||
local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity()
|
||||
local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5
|
||||
|
||||
if Task.IsLandingRequired and Client:GetClientGroupDCSUnit():inAir() then
|
||||
self:T( "Client went back in the air. Go back to stage Landing." )
|
||||
Task.Signalled = false
|
||||
return -1
|
||||
end
|
||||
local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint()
|
||||
local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } )
|
||||
local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight
|
||||
|
||||
self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } )
|
||||
if Task.IsLandingRequired and Task.IsInAirTestRequired == true and Client:GetClientGroupDCSUnit():inAir() then
|
||||
self:T( "Client went back in the air. Go back to stage Landing." )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } )
|
||||
if Task.IsLandingRequired and Task.IsInAirTestRequired == false and DCSUnitVelocity >= 2 and DCSUnitHeight >= Task.CurrentCargoZone.SignalHeight then
|
||||
self:T( "It seems the Client went back in the air and over the boundary limits. Go back to stage Landing." )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
-- Wait until cargo is selected from the menu.
|
||||
if Task.IsLandingRequired then
|
||||
if not Task.Cargo then
|
||||
self:T( 0 )
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
self:T( 1 )
|
||||
return 1
|
||||
end
|
||||
|
||||
@@ -503,7 +563,7 @@ function STAGEUNLOAD:Validate( Mission, Client, Task )
|
||||
self:F()
|
||||
env.info( 'STAGEUNLOAD:Validate()' )
|
||||
|
||||
if routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then
|
||||
if routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then
|
||||
else
|
||||
Task.ExecuteStage = _TransportExecuteStage.FAILED
|
||||
Task:RemoveCargoMenus( Client )
|
||||
@@ -562,10 +622,21 @@ function STAGELOAD:Execute( Mission, Client, Task )
|
||||
self:F()
|
||||
|
||||
if not Task.IsSlingLoad then
|
||||
|
||||
local Host = "Command"
|
||||
if Task.HostUnitName then
|
||||
Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")"
|
||||
else
|
||||
if Client:IsMultiSeated() then
|
||||
Host = "Co-Pilot"
|
||||
end
|
||||
end
|
||||
|
||||
Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.',
|
||||
_TransportStageMsgTime.EXECUTING, Mission.Name .. "/STAGELOAD.EXEC." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
_TransportStageMsgTime.EXECUTING, Mission.Name .. "/STAGELOAD.EXEC." .. Host, Host )
|
||||
|
||||
-- Route the cargo to the Carrier
|
||||
|
||||
Task.Cargo:OnBoard( Client, Task.CurrentCargoZone, Task.OnBoardSide )
|
||||
Task.ExecuteStage = _TransportExecuteStage.EXECUTING
|
||||
else
|
||||
@@ -578,6 +649,14 @@ function STAGELOAD:Executing( Mission, Client, Task )
|
||||
|
||||
-- If the Cargo is ready to be loaded, load it into the Client.
|
||||
|
||||
local Host = "Command"
|
||||
if Task.HostUnitName then
|
||||
Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")"
|
||||
else
|
||||
if Client:IsMultiSeated() then
|
||||
Host = "Co-Pilot"
|
||||
end
|
||||
end
|
||||
|
||||
if not Task.IsSlingLoad then
|
||||
self:T( Task.Cargo.CargoName)
|
||||
@@ -589,14 +668,14 @@ function STAGELOAD:Executing( Mission, Client, Task )
|
||||
|
||||
-- Message to the pilot that cargo has been loaded.
|
||||
Client:Message( "The cargo " .. Task.Cargo.CargoName .. " has been loaded in our helicopter.",
|
||||
20, Mission.Name .. "/STAGELANDING.LOADING1." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
20, Mission.Name .. "/STAGELANDING.LOADING1." .. Host, Host )
|
||||
Task.ExecuteStage = _TransportExecuteStage.SUCCESS
|
||||
|
||||
Client:ShowCargo()
|
||||
end
|
||||
else
|
||||
Client:Message( "Hook the " .. Task.CargoNames .. " onto the helicopter " .. Task.TEXT[3] .. " within the landing zone.",
|
||||
_TransportStageMsgTime.EXECUTING, Mission.Name .. "/STAGELOAD.LOADING.1." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")", 10 )
|
||||
_TransportStageMsgTime.EXECUTING, Mission.Name .. "/STAGELOAD.LOADING.1." .. Host, Host , 10 )
|
||||
for CargoID, Cargo in pairs( CARGOS ) do
|
||||
self:T( "Cargo.CargoName = " .. Cargo.CargoName )
|
||||
|
||||
@@ -612,7 +691,7 @@ function STAGELOAD:Executing( Mission, Client, Task )
|
||||
Cargo:StatusLoaded()
|
||||
Task.Cargo = Cargo
|
||||
Client:Message( 'The Cargo has been successfully hooked onto the helicopter and is now being sling loaded. Fly outside the landing zone.',
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.LOADING.2." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.LOADING.2." .. Host, Host )
|
||||
Task.ExecuteStage = _TransportExecuteStage.SUCCESS
|
||||
break
|
||||
end
|
||||
@@ -630,32 +709,61 @@ function STAGELOAD:Validate( Mission, Client, Task )
|
||||
|
||||
self:T( "Task.CurrentLandingZoneName = " .. Task.CurrentLandingZoneName )
|
||||
|
||||
local Host = "Command"
|
||||
if Task.HostUnitName then
|
||||
Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")"
|
||||
else
|
||||
if Client:IsMultiSeated() then
|
||||
Host = "Co-Pilot"
|
||||
end
|
||||
end
|
||||
|
||||
if not Task.IsSlingLoad then
|
||||
if not routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then
|
||||
if not routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Task.ExecuteStage = _TransportExecuteStage.FAILED
|
||||
Task.CargoName = nil
|
||||
Client:Message( "The " .. Task.CargoType .. " loading has been aborted. You flew outside the pick-up zone while loading. ",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.1." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.1." .. Host, Host )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
if not Client:GetClientGroupDCSUnit():inAir() then
|
||||
else
|
||||
-- The carrier is back in the air, undo the loading process.
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Task.ExecuteStage = _TransportExecuteStage.NONE
|
||||
Task.CargoName = nil
|
||||
Client:Message( "The " .. Task.CargoType .. " loading has been aborted. Re-start the " .. Task.TEXT[3] .. " process. Don't fly outside the pick-up zone.",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.2." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
return -1
|
||||
end
|
||||
local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity()
|
||||
local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5
|
||||
|
||||
local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint()
|
||||
local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } )
|
||||
local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight
|
||||
|
||||
self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } )
|
||||
if Task.IsLandingRequired and Task.IsInAirTestRequired == true and Client:GetClientGroupDCSUnit():inAir() then
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Task.ExecuteStage = _TransportExecuteStage.FAILED
|
||||
Task.CargoName = nil
|
||||
Client:Message( "The " .. Task.CargoType .. " loading has been aborted. Re-start the " .. Task.TEXT[3] .. " process. Don't fly outside the pick-up zone.",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.1." .. Host, Host )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } )
|
||||
if Task.IsLandingRequired and Task.IsInAirTestRequired == false and DCSUnitVelocity >= 2 and DCSUnitHeight >= Task.CurrentCargoZone.SignalHeight then
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Task.ExecuteStage = _TransportExecuteStage.FAILED
|
||||
Task.CargoName = nil
|
||||
Client:Message( "The " .. Task.CargoType .. " loading has been aborted. Re-start the " .. Task.TEXT[3] .. " process. Don't fly outside the pick-up zone.",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.1." .. Host, Host )
|
||||
self:T( -1 )
|
||||
return -1
|
||||
end
|
||||
|
||||
if Task.ExecuteStage == _TransportExecuteStage.SUCCESS then
|
||||
Task:RemoveCargoMenus( Client )
|
||||
Client:Message( "Good Job. The " .. Task.CargoType .. " has been sucessfully " .. Task.TEXT[3] .. " within the landing zone.",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.3." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.3." .. Host, Host )
|
||||
Task.MissionTask:AddGoalCompletion( Task.MissionTask.GoalVerb, Task.CargoName, 1 )
|
||||
self:T( 1 )
|
||||
return 1
|
||||
end
|
||||
|
||||
@@ -664,8 +772,9 @@ function STAGELOAD:Validate( Mission, Client, Task )
|
||||
CargoStatic = StaticObject.getByName( Task.Cargo.CargoStaticName )
|
||||
if CargoStatic and not routines.IsStaticInZones( CargoStatic, Task.CurrentLandingZoneName ) then
|
||||
Client:Message( "Good Job. The " .. Task.CargoType .. " has been sucessfully " .. Task.TEXT[3] .. " and flown outside of the landing zone.",
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.4." .. Task.HostUnitName, Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" )
|
||||
self.MSG.TIME, Mission.Name .. "/STAGELANDING.VALIDATE.4." .. Host, Host )
|
||||
Task.MissionTask:AddGoalCompletion( Task.MissionTask.GoalVerb, Task.Cargo.CargoName, 1 )
|
||||
self:T( 1 )
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -673,6 +782,7 @@ function STAGELOAD:Validate( Mission, Client, Task )
|
||||
end
|
||||
|
||||
|
||||
self:T( 0 )
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ end
|
||||
--- Get progress of a TASK.
|
||||
-- @return string GoalsText
|
||||
function TASK:GetGoalProgress()
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local GoalsText = ""
|
||||
for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do
|
||||
@@ -115,7 +115,7 @@ end
|
||||
-- @param MISSION Mission Group structure describing the Mission.
|
||||
-- @param CLIENT Client Group structure describing the Client.
|
||||
function TASK:ShowGoalProgress( Mission, Client )
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local GoalsText = ""
|
||||
for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do
|
||||
@@ -137,14 +137,14 @@ end
|
||||
|
||||
--- Sets a TASK to status Done.
|
||||
function TASK:Done()
|
||||
self:F()
|
||||
self:F2()
|
||||
self.TaskDone = true
|
||||
end
|
||||
|
||||
--- Returns if a TASK is done.
|
||||
-- @return bool
|
||||
function TASK:IsDone()
|
||||
self:F( self.TaskDone )
|
||||
self:F2( self.TaskDone )
|
||||
return self.TaskDone
|
||||
end
|
||||
|
||||
@@ -157,12 +157,12 @@ end
|
||||
--- Returns if a TASk has failed.
|
||||
-- @return bool
|
||||
function TASK:IsFailed()
|
||||
self:F( self.TaskFailed )
|
||||
self:F2( self.TaskFailed )
|
||||
return self.TaskFailed
|
||||
end
|
||||
|
||||
function TASK:Reset( Mission, Client )
|
||||
self:F()
|
||||
self:F2()
|
||||
self.ExecuteStage = _TransportExecuteStage.NONE
|
||||
end
|
||||
|
||||
@@ -173,13 +173,15 @@ function TASK:GetGoals()
|
||||
end
|
||||
|
||||
--- Returns if a TASK has Goal(s).
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @param #TASK self
|
||||
-- @param #string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @return bool
|
||||
function TASK:Goal( GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
self:T2( {self.GoalTasks[GoalVerb] } )
|
||||
if self.GoalTasks[GoalVerb] and self.GoalTasks[GoalVerb].GoalTotal > 0 then
|
||||
return true
|
||||
else
|
||||
@@ -191,7 +193,7 @@ end
|
||||
-- @param number GoalTotal is the number of times the GoalVerb needs to be achieved.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:SetGoalTotal( GoalTotal, GoalVerb )
|
||||
self:F( { GoalTotal, GoalVerb } )
|
||||
self:F2( { GoalTotal, GoalVerb } )
|
||||
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
@@ -206,7 +208,7 @@ end
|
||||
--- Gets the total of Goals to be achieved within the TASK of the GoalVerb.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:GetGoalTotal( GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -222,7 +224,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:SetGoalCount( GoalCount, GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -237,7 +239,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:IncreaseGoalCount( GoalCountIncrease, GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalCountIncrease, GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -251,7 +253,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalCount( GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -266,7 +268,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalPercentage( GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -279,15 +281,16 @@ end
|
||||
|
||||
--- Returns if all the Goals of the TASK were achieved.
|
||||
-- @return bool
|
||||
function TASK:IsGoalReached( )
|
||||
function TASK:IsGoalReached()
|
||||
self:F2()
|
||||
|
||||
local GoalReached = true
|
||||
|
||||
for GoalVerb, Goals in pairs( self.GoalTasks ) do
|
||||
self:T( { "GoalVerb", GoalVerb } )
|
||||
self:T2( { "GoalVerb", GoalVerb } )
|
||||
if self:Goal( GoalVerb ) then
|
||||
local GoalToDo = self:GetGoalTotal( GoalVerb ) - self:GetGoalCount( GoalVerb )
|
||||
self:T( "GoalToDo = " .. GoalToDo )
|
||||
self:T2( "GoalToDo = " .. GoalToDo )
|
||||
if GoalToDo <= 0 then
|
||||
else
|
||||
GoalReached = false
|
||||
@@ -298,7 +301,7 @@ function TASK:IsGoalReached( )
|
||||
end
|
||||
end
|
||||
|
||||
self:T( GoalReached )
|
||||
self:T( { GoalReached, self.GoalTasks } )
|
||||
return GoalReached
|
||||
end
|
||||
|
||||
@@ -307,7 +310,7 @@ end
|
||||
-- @param string GoalTask is a text describing the Goal of the TASK to be achieved.
|
||||
-- @param number GoalIncrease is a number by which the Goal achievement is increasing.
|
||||
function TASK:AddGoalCompletion( GoalVerb, GoalTask, GoalIncrease )
|
||||
self:F( { GoalVerb, GoalTask, GoalIncrease } )
|
||||
self:F2( { GoalVerb, GoalTask, GoalIncrease } )
|
||||
|
||||
if self:Goal( GoalVerb ) then
|
||||
self.GoalTasks[GoalVerb].Goals[#self.GoalTasks[GoalVerb].Goals+1] = GoalTask
|
||||
@@ -320,7 +323,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return string Goals
|
||||
function TASK:GetGoalCompletion( GoalVerb )
|
||||
self:F( { GoalVerb } )
|
||||
self:F2( { GoalVerb } )
|
||||
|
||||
if self:Goal( GoalVerb ) then
|
||||
local Goals = ""
|
||||
|
||||
@@ -56,11 +56,13 @@ UNIT = {
|
||||
-- @return Unit#UNIT
|
||||
function UNIT:New( DCSUnit )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( DCSUnit:getName() )
|
||||
self:F( DCSUnit )
|
||||
|
||||
self.DCSUnit = DCSUnit
|
||||
self.UnitName = DCSUnit:getName()
|
||||
self.UnitID = DCSUnit:getID()
|
||||
if DCSUnit then
|
||||
self.UnitName = DCSUnit:getName()
|
||||
self.UnitID = DCSUnit:getID()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -91,6 +93,18 @@ function UNIT:GetName()
|
||||
return self.UnitName
|
||||
end
|
||||
|
||||
function UNIT:GetPlayerName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
local DCSUnit = Unit.getByName( self.UnitName )
|
||||
|
||||
local PlayerName = DCSUnit:getPlayerName()
|
||||
if PlayerName == nil then
|
||||
PlayerName = ""
|
||||
end
|
||||
|
||||
return PlayerName
|
||||
end
|
||||
function UNIT:GetTypeName()
|
||||
self:F( self.UnitName )
|
||||
|
||||
|
||||
@@ -40,15 +40,27 @@ function ZONE:GetPointVec2()
|
||||
return Point
|
||||
end
|
||||
|
||||
function ZONE:GetPointVec3( Height )
|
||||
self:F( self.ZoneName )
|
||||
|
||||
local Zone = trigger.misc.getZone( self.ZoneName )
|
||||
local Point = { x = Zone.point.x, y = land.getHeight( self:GetPointVec2() ) + Height, z = Zone.point.z }
|
||||
|
||||
self:T( { Zone, Point } )
|
||||
|
||||
return Point
|
||||
end
|
||||
|
||||
function ZONE:GetRandomPointVec2()
|
||||
self:F( self.ZoneName )
|
||||
|
||||
local Point = {}
|
||||
|
||||
local Zone = trigger.misc.getZone( self.ZoneName )
|
||||
|
||||
Point.x = Zone.point.x + math.random( Zone.radius * -1, Zone.radius )
|
||||
Point.y = Zone.point.z + math.random( Zone.radius * -1, Zone.radius )
|
||||
|
||||
local angle = math.random() * math.pi*2;
|
||||
Point.x = Zone.point.x + math.cos( angle ) * math.random() * Zone.radius;
|
||||
Point.y = Zone.point.z + math.sin( angle ) * math.random() * Zone.radius;
|
||||
|
||||
self:T( { Zone, Point } )
|
||||
|
||||
|
||||
BIN
Presentations/DCS World - MOOSE - Missile Trainer.pptx
Normal file
BIN
Presentations/DCS World - MOOSE - Missile Trainer.pptx
Normal file
Binary file not shown.
BIN
Presentations/DCS World - MOOSE - Spawning - Part 2 - APIs.pptx
Normal file
BIN
Presentations/DCS World - MOOSE - Spawning - Part 2 - APIs.pptx
Normal file
Binary file not shown.
10
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.lua
Normal file
10
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
Include.File( 'Cleanup' )
|
||||
Include.File( 'Spawn' )
|
||||
Include.File( 'Event')
|
||||
|
||||
Clean = CLEANUP:New( 'CLEAN_BATUMI', 180 )
|
||||
|
||||
SpawnRU = SPAWN:New( 'RU Attack Heli Batumi'):Limit( 2, 20 ):SpawnScheduled( 2, 0.2 )
|
||||
|
||||
SpawnUS = SPAWN:New( 'US Attack Heli Batumi'):Limit( 2, 20 ):SpawnScheduled( 2, 0.2 )
|
||||
|
||||
BIN
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
Normal file
BIN
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
Normal file
Binary file not shown.
74
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.lua
Normal file
74
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
Include.File( 'Database' )
|
||||
Include.File( 'Spawn' )
|
||||
|
||||
DBBluePlanes = DATABASE:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
DBRedVehicles = DATABASE:New()
|
||||
:FilterCoalitions( "red" )
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
DBShips = DATABASE:New()
|
||||
:FilterCategories( "ship" )
|
||||
:FilterStart()
|
||||
|
||||
DBBelgium = DATABASE:New()
|
||||
:FilterCategories( "helicopter" )
|
||||
:FilterCountries( "BELGIUM" )
|
||||
:FilterStart()
|
||||
|
||||
DBNorthKorea = DATABASE:New()
|
||||
:FilterCountries( "NORTH_KOREA" )
|
||||
:FilterStart()
|
||||
|
||||
DBKA50Vinson = DATABASE:New()
|
||||
:FilterTypes( { "Ka-50", "VINSON" } )
|
||||
:FilterStart()
|
||||
|
||||
DBBluePlanes:TraceDatabase()
|
||||
DBRedVehicles:TraceDatabase()
|
||||
DBShips:TraceDatabase()
|
||||
DBBelgium:TraceDatabase()
|
||||
DBNorthKorea:TraceDatabase()
|
||||
DBKA50Vinson:TraceDatabase()
|
||||
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Database Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Database Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Database Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Database Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Database Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnUS_AttackVehicle = SPAWN:New( 'Database Spawn Test USA Attack Vehicle' )
|
||||
SpawnRU_AttackVehicle = SPAWN:New( 'Database Spawn Test RUSSIA Attack Vehicle' )
|
||||
|
||||
for i = 1, 10 do
|
||||
GroupRU_AttackVehicle = SpawnRU_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone RU"), true)
|
||||
GroupUS_AttackVehicle = SpawnUS_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone US"), true)
|
||||
end
|
||||
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
routines.scheduleFunction( DBBluePlanes.TraceDatabase, { DBBluePlanes }, 1 )
|
||||
routines.scheduleFunction( DBRedVehicles.TraceDatabase, { DBRedVehicles }, 1 )
|
||||
routines.scheduleFunction( DBShips.TraceDatabase, { DBShips }, 1 )
|
||||
routines.scheduleFunction( DBBelgium.TraceDatabase, { DBBelgium }, 1 )
|
||||
routines.scheduleFunction( DBNorthKorea.TraceDatabase, { DBNorthKorea }, 1 )
|
||||
routines.scheduleFunction( DBKA50Vinson.TraceDatabase, { DBKA50Vinson }, 1 )
|
||||
|
||||
DBRedVehicles
|
||||
:ForEachAliveUnit( function( DCSUnit )
|
||||
DBRedVehicles:T( DCSUnit:getName() )
|
||||
end )
|
||||
BIN
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.miz
Normal file
BIN
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.miz
Normal file
Binary file not shown.
BIN
Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
Normal file
BIN
Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
Normal file
Binary file not shown.
41
Test Missions/Moose_Test_DESTROY/Moose_Test_DESTROY.lua
Normal file
41
Test Missions/Moose_Test_DESTROY/Moose_Test_DESTROY.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- MOOSE include files.
|
||||
Include.File( "Mission" )
|
||||
Include.File( "Client" )
|
||||
Include.File( "DestroyGroupsTask" )
|
||||
Include.File( "DestroyRadarsTask" )
|
||||
Include.File( "DestroyUnitTypesTask" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Unit" )
|
||||
Include.File( "Zone" )
|
||||
Include.File( "Event" )
|
||||
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Gound', 'Ground', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying targets. Your mission goal should increase..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Ground Vehicle', 'Ground Vehicles', { 'DESTROY Test 1' }, 100 ) -- 75% of a patriot battery needs to be destroyed to achieve mission success...
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 1 )
|
||||
Mission:AddTask( DESTROYGROUPSTASK, 1 )
|
||||
|
||||
MISSIONSCHEDULER.AddMission( Mission )
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Helicopters', 'Helicopters', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying the helicopters. The helicopter mission goal should increase once all are destroyed ..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Helicopter', 'Helicopters', { 'DESTROY Test 2' }, 50 )
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 2 )
|
||||
Mission:AddTask( DESTROYGROUPSTASK, 1 )
|
||||
|
||||
MISSIONSCHEDULER.AddMission( Mission )
|
||||
end
|
||||
|
||||
-- MISSION SCHEDULER STARTUP
|
||||
MISSIONSCHEDULER.Start()
|
||||
MISSIONSCHEDULER.ReportMenu()
|
||||
MISSIONSCHEDULER.ReportMissionsFlash( 30 )
|
||||
MISSIONSCHEDULER.ReportMissionsHide()
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
-- Only use Include.File when developing new MOOSE classes.
|
||||
-- When using Moose.lua in the DO SCIPTS FILE initialization box,
|
||||
-- these Include.File statements are not needed, because all classes within Moose will be loaded.
|
||||
Include.File("MissileTrainer")
|
||||
|
||||
-- This is an example of a global
|
||||
local Trainer = MISSILETRAINER
|
||||
:New( 200, "Trainer: Welcome to the missile training, trainee! Missiles will be fired at you. Try to evade them. Good luck!" )
|
||||
:InitMessagesOnOff(true)
|
||||
:InitAlertsToAll(true)
|
||||
:InitAlertsHitsOnOff(true)
|
||||
:InitAlertsLaunchesOnOff(false) -- I'll put it on below ...
|
||||
:InitBearingOnOff(true)
|
||||
:InitRangeOnOff(true)
|
||||
:InitTrackingOnOff(true)
|
||||
:InitTrackingToAll(true)
|
||||
:InitMenusOnOff(false)
|
||||
|
||||
Trainer:InitAlertsToAll(true) -- Now alerts are also on
|
||||
Binary file not shown.
BIN
Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
Normal file
BIN
Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
Normal file
Binary file not shown.
11
Test Missions/Moose_Test_SEAD/Moose_Test_SEAD.lua
Normal file
11
Test Missions/Moose_Test_SEAD/Moose_Test_SEAD.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
Include.File( "Sead" )
|
||||
|
||||
|
||||
-- CCCP SEAD Defenses
|
||||
SEAD_RU_SAM_Defenses = SEAD
|
||||
:New(
|
||||
{ 'SAM Test'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -46,15 +46,15 @@ Spawn_Helicopter_Scheduled = SPAWN:New( "Spawn Helicopter Scheduled" ):SpawnSche
|
||||
Spawn_Ship_Scheduled = SPAWN:New( "Spawn Ship Scheduled" ):SpawnScheduled( 30, 0.5 )
|
||||
Spawn_Vehicle_Scheduled = SPAWN:New( "Spawn Vehicle Scheduled" ):SpawnScheduled( 30, 0.5 )
|
||||
|
||||
-- Tests Tbilisi: Limited Spawning
|
||||
-- -------------------------------
|
||||
-- Tests Tbilisi: Limited Spawning and repeat
|
||||
-- ------------------------------------------
|
||||
-- Spawing one group, and respawning the same group when it lands ...
|
||||
Spawn_Plane_Limited_Repeat = SPAWN:New( "Spawn Plane Limited Repeat" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Plane_Limited_RepeatOnLanding = SPAWN:New( "Spawn Plane Limited RepeatOnLanding" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Plane_Limited_RepeatOnEngineShutDown = SPAWN:New( "Spawn Plane Limited RepeatOnEngineShutDown" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Helicopter_Limited_Repeat = SPAWN:New( "Spawn Helicopter Limited Repeat" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Helicopter_Limited_RepeatOnLanding = SPAWN:New( "Spawn Helicopter Limited RepeatOnLanding" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Helicopter_Limited_RepeatOnEngineShutDown = SPAWN:New( "Spawn Helicopter Limited RepeatOnEngineShutDown" ):Limit( 1, 1 ):Repeat():Spawn()
|
||||
Spawn_Plane_Limited_Repeat = SPAWN:New( "Spawn Plane Limited Repeat" ):Limit( 1, 1 ):InitRepeat():Spawn()
|
||||
Spawn_Plane_Limited_RepeatOnLanding = SPAWN:New( "Spawn Plane Limited RepeatOnLanding" ):Limit( 1, 1 ):InitRepeatOnLanding():Spawn()
|
||||
Spawn_Plane_Limited_RepeatOnEngineShutDown = SPAWN:New( "Spawn Plane Limited RepeatOnEngineShutDown" ):Limit( 1, 1 ):InitRepeatOnEngineShutDown():Spawn()
|
||||
Spawn_Helicopter_Limited_Repeat = SPAWN:New( "Spawn Helicopter Limited Repeat" ):Limit( 1, 1 ):InitRepeat():Spawn()
|
||||
Spawn_Helicopter_Limited_RepeatOnLanding = SPAWN:New( "Spawn Helicopter Limited RepeatOnLanding" ):Limit( 1, 1 ):InitRepeatOnLanding():Spawn()
|
||||
Spawn_Helicopter_Limited_RepeatOnEngineShutDown = SPAWN:New( "Spawn Helicopter Limited RepeatOnEngineShutDown" ):Limit( 1, 1 ):InitRepeatOnEngineShutDown():Spawn()
|
||||
|
||||
|
||||
-- Tests Soganlug
|
||||
@@ -67,8 +67,8 @@ Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):
|
||||
-- Tests Sukhumi
|
||||
-- -------------
|
||||
-- Limited spawning of groups, scheduled every seconds with route randomization.
|
||||
Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled RandomizeRoute" ):Limit( 2, 10 ):RandomizeRoute( 1, 1, 4000 ):SpawnScheduled( 30, 0 )
|
||||
Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled RandomizeRoute" ):Limit( 2, 10 ):RandomizeRoute( 1, 1, 4000 ):SpawnScheduled( 30, 0 )
|
||||
Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled RandomizeRoute" ):Limit( 5, 10 ):RandomizeRoute( 1, 1, 4000 ):SpawnScheduled( 2, 0 )
|
||||
Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled RandomizeRoute" ):Limit( 5, 10 ):RandomizeRoute( 1, 1, 4000 ):SpawnScheduled( 2, 0 )
|
||||
Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled RandomizeRoute" ):Limit( 10, 10 ):RandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 1, 0 )
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limit
|
||||
-- Tests the CleanUp functionality.
|
||||
-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground.
|
||||
-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn.
|
||||
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 180 ):SpawnScheduled( 10, 0 )
|
||||
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 60 ):SpawnScheduled( 10, 0 )
|
||||
Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )
|
||||
|
||||
-- Maykop
|
||||
@@ -85,7 +85,7 @@ Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" )
|
||||
-- Creates arrays of groups ready to be spawned and dynamic spawning of groups from another group.
|
||||
|
||||
-- SpawnTestVisible creates an array of 200 groups, every 20 groups with 20 meters space in between, and will activate a group of the array every 10 seconds with a 0.2 time randomization.
|
||||
SpawnTestVisible = SPAWN:New( "Spawn Vehicle Visible Scheduled" ):Limit( 200, 200 ):Array( 59, 20, 20, 10 ):SpawnScheduled( 10, 0.2 )
|
||||
SpawnTestVisible = SPAWN:New( "Spawn Vehicle Visible Scheduled" ):Limit( 200, 200 ):Array( 59, 20, 30, 30 ):SpawnScheduled( 10, 0.2 )
|
||||
|
||||
-- Spawn_Templates_Visible contains different templates...
|
||||
Spawn_Templates_Visible = { "Spawn Vehicle Visible Template A",
|
||||
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user