diff --git a/Moose Development/Moose/AI/AI_CAS.lua b/Moose Development/Moose/AI/AI_CAS.lua index e6eb23626..bb9bb556a 100644 --- a/Moose Development/Moose/AI/AI_CAS.lua +++ b/Moose Development/Moose/AI/AI_CAS.lua @@ -492,7 +492,7 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To, EngageSpeed, true ) - ToTargetPointVec3:SmokeBlue() + --ToTargetPointVec3:SmokeBlue() EngageRoute[#EngageRoute+1] = ToTargetRoutePoint diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua index a5cd68431..8ebe4125c 100644 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170306_1142' ) +env.info( 'Moose Generation Timestamp: 20170306_1631' ) local base = _G Include = {} @@ -27817,7 +27817,7 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To, EngageSpeed, true ) - ToTargetPointVec3:SmokeBlue() + --ToTargetPointVec3:SmokeBlue() EngageRoute[#EngageRoute+1] = ToTargetRoutePoint diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index a5cd68431..8ebe4125c 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170306_1142' ) +env.info( 'Moose Generation Timestamp: 20170306_1631' ) local base = _G Include = {} @@ -27817,7 +27817,7 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To, EngageSpeed, true ) - ToTargetPointVec3:SmokeBlue() + --ToTargetPointVec3:SmokeBlue() EngageRoute[#EngageRoute+1] = ToTargetRoutePoint diff --git a/Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot Example/EVT-100 - OnEventShot Example.miz b/Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot Example/EVT-100 - OnEventShot Example.miz index 5515dfa11..22f687d8a 100644 Binary files a/Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot Example/EVT-100 - OnEventShot Example.miz and b/Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot Example/EVT-100 - OnEventShot Example.miz differ diff --git a/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua b/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua new file mode 100644 index 000000000..e6e69e973 --- /dev/null +++ b/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua @@ -0,0 +1,29 @@ +--- +-- Name: EVT-600 - OnEventHit Example with a Set of Units +-- Author: FlightControl +-- Date Created: 6 Mar 2017 +-- +-- # Situation: +-- +-- A plane is flying in the air and shoots an missile to a ground target. +-- It will shoot a couple of tanks units that are part of a Set. +-- +-- # Test cases: +-- +-- 1. Observe the plane shooting the missile. +-- 2. Observe when the plane hits a tank, a dcs.log entry is written in the logging. +-- 4. Observe the tanks hitting the targets and the messages appear. +-- 3. Check the contents of the fields of the S_EVENT_HIT entries. + +local Plane = UNIT:FindByName( "Plane" ) + +local UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart() + +UnitSet:HandleEvent( EVENTS.Hit ) + +function UnitSet:OnEventHit( EventData ) + + Plane:MessageToAll( "I just hit a tank! " .. EventData.IniUnit:GetName(), 15, "Alert!" ) +end + + diff --git a/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz b/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz new file mode 100644 index 000000000..ed45cdd89 Binary files /dev/null and b/Moose Test Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz differ