Various Fixes

-- Documentation fixes with links not working.
-- MENU_CLIENT_COMMAND had a small glitch, fixed that one too.
-- Implemented new Event Dispatcher.
--
This commit is contained in:
FlightControl
2017-02-04 15:16:32 +01:00
parent be4d51237b
commit 52f4051901
104 changed files with 65657 additions and 749 deletions

View File

@@ -1,3 +1,4 @@
---
-- Name: AIB-001 - Spawned AI
-- Author: FlightControl
-- Date Created: 07 Dec 2016

View File

@@ -1,5 +1,23 @@
---
-- Name: DET-001 - Detection Areas
-- Author: FlightControl
-- Date Created: 04 Feb 2017
--
-- # Situation:
--
-- A small blue vehicle with laser detection methods is detecting targets.
-- Targets are grouped within areas. A detection range and zone range is given to group the detected units.
-- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other.
--
-- # Test cases:
--
-- 1. Observe the flaring of the areas formed
-- 2. Observe the smoking of the units detected
-- 3. Observe the areas being flexibly changed very detection run.
-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second.
-- 5. While driving in between the areas, it will have a separate area.
local FACGroup = GROUP:FindByName( "FAC Group" )
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
local FACDetection = DETECTION_AREAS:New( FACGroup, 1000, 250 ):FlareDetectedZones():FlareDetectedUnits()
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 ):FlareDetectedZones():SmokeDetectedUnits()

View File

@@ -1,8 +1,8 @@
local FACGroup = GROUP:FindByName( "FAC Group" )
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
local FACDetection = DETECTION_AREAS:New( FACGroup, 1000, 250 )
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
local SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
local DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()

View File

@@ -0,0 +1,47 @@
---
-- Name: SPA-130 - Uncontrolled Spawning
-- Author: FlightControl
-- Date Created: 04 Feb 2017
--
-- # Situation:
--
-- A plane will be spawned Uncontrolled and later one will be spawned Controlled.
-- Only the Controlled plane will move, the other will remain idle at the parking spot.
--
-- # Test cases:
--
-- 1. Observe the spawning of the UnControlled Plane.
-- 2. Observe the spawning of the Controlled Plane.
-- Create the SPAWN object looking for the group (template) "Plane".
local SpawnPlane = SPAWN:New( "Plane" )
-- Set the spawn mode to UnControlled.
SpawnPlane:InitUnControlled( true )
-- Spawn the UnControlled Group
local UnControlledPlane = SpawnPlane:Spawn()
-- Set the spawn mode back to Controlled.
SpawnPlane:InitUnControlled( false )
local ControlledPlane = SpawnPlane:Spawn()
-- Now, let's create a menu option at a player slot plane...
-- We can only create the menu option if the player has joined the slot ...
local PlayerPlane = CLIENT:FindByName( "PlayerPlane", "Select Menu item to activate UnControlled plane" )
PlayerPlane:Alive(
function( Client, SpawnPlane )
--- @param Functional.Spawn#SPAWN SpawnPlane
local function ActivatePlane( SpawnPlane )
SpawnPlane:InitUnControlled( false )
SpawnPlane:ReSpawn( 1 )
end
local Menu = MENU_CLIENT_COMMAND:New( Client, "Select to activate UnControlled plane", nil, ActivatePlane, SpawnPlane )
end
, SpawnPlane
)