Updated the SPAWN test mission, to ensure that ALL tests are working correctly.

- Fixed code in the mission to spawn vehicles from the Helicopters
(Chinooks), using the new APIs.
- Fixed code in the mission to spawn infantry from the army transport
vehicles using the new APIs.
This commit is contained in:
FlightControl 2016-06-18 10:21:29 +02:00
parent 325c20cb46
commit 36b101fa6d
6 changed files with 20 additions and 9 deletions

View File

@ -2436,6 +2436,8 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
end
end
return Points
else
error( "Template not found for Group : " .. GroupName )
end
return nil

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160618_0000' )
env.info( 'Moose Generation Timestamp: 20160618_1019' )
local base = _G
Include = {}
@ -6617,6 +6617,8 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
end
end
return Points
else
error( "Template not found for Group : " .. GroupName )
end
return nil

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160618_0000' )
env.info( 'Moose Generation Timestamp: 20160618_1019' )
local base = _G
Include = {}
@ -6617,6 +6617,8 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
end
end
return Points
else
error( "Template not found for Group : " .. GroupName )
end
return nil

View File

@ -121,18 +121,23 @@ Spawn_Vehicle_Host = SPAWN:New( "Spawn Vehicle Host" )
:SpawnScheduled( 10, 0.2 )
-- Spawn_Vehicle_SpawnToZone allows to spawn 10 vehicle groups.
-- The vehicles will drive to waypoint 1, where it will spawn infantry that will walk to a certain point.
-- ---------------------------------------------------------------------------------------------
-- local InfantryGroup = Spawn_Infantry:SpawnFromUnit( GROUP:Find(...):GetUnit(1), 100, 5 )
-- local InfantryRoute = InfantryGroup:CopyRoute( 1, 0, true, 1000 )
-- InfantryGroup:Route( InfantryRoute )
-- ---------------------------------------------------------------------------------------------
Spawn_Vehicle_SpawnToZone = SPAWN:New( "Spawn Vehicle SpawnToZone" )
:Limit( 10, 10 )
-- Spawn_Helicopter_SpawnToZone will fly to a location, hover, and spawn one vehicle on the ground, the helicopter will land
-- and the vehicle will drive to a random location within the defined zone.
-- For this, the following code is activated within the mission on waypoint 3:
--
-- ------------------------------------------------------------------------------------------------------
-- local InfantryDropGroup = Spawn_Vehicle_SpawnToZone:SpawnFromUnit( GROUP:Find( ... ):GetUnit(1) )
-- local InfantryDropRoute = InfantryDropGroup:CopyRoute( 1, 0 )
-- InfantryDropGroup:RouteToZone( ZONE:New( "Target Zone" ), true, 80 )
--
-- InfantryDropGroup:TaskRouteToZone( ZONE:New( "Target Zone" ), true, 80 )
-- ------------------------------------------------------------------------------------------------------
Spawn_Helicopter_SpawnToZone = SPAWN:New( "Spawn Helicopter SpawnToZone" )
:Limit( 10, 10 )
:SpawnScheduled( 60, 0.2 )