Publish reworked missions with global variables

This commit is contained in:
FlightControl
2017-03-18 14:42:03 +01:00
parent 553ceb462e
commit cd69b8a879
195 changed files with 294 additions and 293 deletions

View File

@@ -13,7 +13,7 @@
-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging.
-- 3. Check the contents of the fields of the S_EVENT_SHOT entry.
local Plane = UNIT:FindByName( "Plane" )
Plane = UNIT:FindByName( "Plane" )
Plane:HandleEvent( EVENTS.Shot )

View File

@@ -13,9 +13,9 @@
-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging.
-- 3. Check the contents of the fields of the S_EVENT_HIT entry.
local Plane = UNIT:FindByName( "Plane" )
Plane = UNIT:FindByName( "Plane" )
local Tank = UNIT:FindByName( "Tank" )
Tank = UNIT:FindByName( "Tank" )
Plane:HandleEvent( EVENTS.Hit )
Tank:HandleEvent( EVENTS.Hit )

View File

@@ -13,9 +13,9 @@
-- 2. When the planes take-off, observe the message being sent.
-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file.
local PlaneAI = UNIT:FindByName( "PlaneAI" )
PlaneAI = UNIT:FindByName( "PlaneAI" )
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
PlaneAI:HandleEvent( EVENTS.Takeoff )
PlaneHuman:HandleEvent( EVENTS.Takeoff )

View File

@@ -15,10 +15,10 @@
-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file.
-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI".
local PlaneAI = UNIT:FindByName( "PlaneAI" )
PlaneAI = UNIT:FindByName( "PlaneAI" )
-- Create a SPAWN object to spawn a new plane once the hold one lands.
local SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
-- Declare a new variable that will hold the new spawned SpawnPlaneAI
local NewPlane

View File

@@ -15,7 +15,7 @@
-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file.
-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman".
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else).
PlaneHuman:HandleEvent( EVENTS.Crash )

View File

@@ -15,7 +15,7 @@
-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile.
-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile.
local PlaneGroup = GROUP:FindByName( "Group Plane A" )
PlaneGroup = GROUP:FindByName( "Group Plane A" )
PlaneGroup:HandleEvent( EVENTS.Shot )

View File

@@ -15,7 +15,7 @@
-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit.
-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit.
local TanksGroup = GROUP:FindByName( "Group Tanks A" )
TanksGroup = GROUP:FindByName( "Group Tanks A" )
TanksGroup:HandleEvent( EVENTS.Hit )

View File

@@ -13,10 +13,10 @@
-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging.
-- 3. The generic EventHandler objects should receive the hit events.
local CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
local EventHandler1 = EVENTHANDLER:New()
local EventHandler2 = EVENTHANDLER:New()
EventHandler1 = EVENTHANDLER:New()
EventHandler2 = EVENTHANDLER:New()
EventHandler1:HandleEvent( EVENTS.Hit )
EventHandler2:HandleEvent( EVENTS.Hit )

View File

@@ -15,9 +15,9 @@
-- 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" )
Plane = UNIT:FindByName( "Plane" )
local UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart()
UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart()
UnitSet:HandleEvent( EVENTS.Hit )