From 8777f516aff190f7154a14d4d517d90c66ac3064 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Sun, 5 Jun 2016 11:27:18 +0200 Subject: [PATCH] Preparing for presentation --- Moose Development/Moose/Spawn.lua | 24 +++++++++--------- Moose Development/Moose/Zone.lua | 12 +++++++++ Moose Training/Documentation/Spawn.html | 14 +++++----- Moose Training/Documentation/Zone.html | 12 +++++++++ Moose Training/Documentation/index.html | 2 +- ...art 1 - Use zones with GROUP and UNIT.pptx | Bin 0 -> 788485 bytes 6 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 Moose Training/Presentations/DCS World - MOOSE - Zones - Part 1 - Use zones with GROUP and UNIT.pptx diff --git a/Moose Development/Moose/Spawn.lua b/Moose Development/Moose/Spawn.lua index afe13cae3..9ea27a16a 100644 --- a/Moose Development/Moose/Spawn.lua +++ b/Moose Development/Moose/Spawn.lua @@ -1,7 +1,7 @@ ---- Dynamic spawning of groups (and units). +--- This module contains the SPAWN class. -- --- @{#SPAWN} class --- =============== +-- 1) @{Spawn#SPAWN} class, extends @{Base#BASE} +-- ============================================= -- 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. @@ -24,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. -- --- SPAWN construction methods: --- =========================== +-- 1.1) 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. @@ -34,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. -- --- SPAWN initialization methods: --- ============================= +-- 1.2) 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. @@ -45,8 +45,8 @@ -- * @{#SPAWN.Array}: Make groups visible before they are actually activated, and order these groups like a batallion in an array. -- * @{#SPAWN.InitRepeat}: Re-spawn groups when they land at the home base. Similar functions are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}. -- --- SPAWN spawning methods: --- ======================= +-- 1.3) SPAWN spawning methods +-- --------------------------- -- Groups can be spawned at different times and methods: -- -- * @{#SPAWN.Spawn}: Spawn one new group based on the last spawned index. @@ -58,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. -- --- SPAWN object cleaning: --- ========================= +-- 1.4) 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. @@ -70,7 +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 diff --git a/Moose Development/Moose/Zone.lua b/Moose Development/Moose/Zone.lua index feeba12f7..5ea17eee4 100644 --- a/Moose Development/Moose/Zone.lua +++ b/Moose Development/Moose/Zone.lua @@ -26,26 +26,38 @@ -- * @{#ZONE_BASE.IsPointVec2InZone}: Returns if a location is within the zone. -- * @{#ZONE_BASE.IsPointVec3InZone}: Returns if a point is within the zone. -- +-- === +-- -- 1) @{Zone#ZONE_BASE} class, extends @{Base#BASE} -- ================================================ -- The ZONE_BASE class defining the base for all other zone classes. -- +-- === +-- -- 2) @{Zone#ZONE_RADIUS} class, extends @{Zone#ZONE_BASE} -- ======================================================= -- The ZONE_RADIUS class defined by a zone name, a location and a radius. -- +-- === +-- -- 3) @{Zone#ZONE} class, extends @{Zone#ZONE_RADIUS} -- ========================================== -- The ZONE class, defined by the zone name as defined within the Mission Editor. -- +-- === +-- -- 4) @{Zone#ZONE_UNIT} class, extends @{Zone#ZONE_RADIUS} -- ======================================================= -- The ZONE_UNIT class defined by a zone around a @{Unit#UNIT} with a radius. -- +-- === +-- -- 5) @{Zone#ZONE_POLYGON} class, extends @{Zone#ZONE_BASE} -- ======================================================== -- The ZONE_POLYGON class defined by a sequence of @{Group#GROUP} waypoints within the Mission Editor, forming a polygon. -- +-- === +-- -- @module Zone -- @author FlightControl diff --git a/Moose Training/Documentation/Spawn.html b/Moose Training/Documentation/Spawn.html index 7420637c5..042e1984c 100644 --- a/Moose Training/Documentation/Spawn.html +++ b/Moose Training/Documentation/Spawn.html @@ -71,11 +71,11 @@

Module Spawn

-

Dynamic spawning of groups (and units).

+

This module contains the SPAWN class.

-

#SPAWN class

+

1) Spawn#SPAWN class, extends Base#BASE

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.

@@ -102,7 +102,7 @@ Groups will follow the following naming structure when spawned at run-time:

  • 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.
  • -

    SPAWN construction methods:

    +

    1.1) SPAWN construction methods

    Create a new SPAWN object with the SPAWN.New or the SPAWN.NewWithAlias methods: