diff --git a/Loaders/MOOSE-Dynamic Loader.miz b/Loaders/MOOSE-Dynamic Loader.miz index 98f18423e..fd2191d99 100644 Binary files a/Loaders/MOOSE-Dynamic Loader.miz and b/Loaders/MOOSE-Dynamic Loader.miz differ diff --git a/Moose/Spawn.lua b/Moose/Spawn.lua index 098846436..d159a83b3 100644 --- a/Moose/Spawn.lua +++ b/Moose/Spawn.lua @@ -392,10 +392,10 @@ end ---- Will re-spawn a group based on a given index. +--- Will spawn a group based on the internal index. -- Note: Uses @{DATABASE} module defined in MOOSE. -- @param self --- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. +-- @return Group#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:Spawn() self:F( { self.SpawnTemplatePrefix, self.SpawnIndex } ) @@ -406,7 +406,7 @@ end -- Note: Uses @{DATABASE} module defined in MOOSE. -- @param self -- @param #string SpawnIndex The index of the group to be spawned. --- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. +-- @return Group#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:ReSpawn( SpawnIndex ) self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) @@ -425,7 +425,7 @@ end --- Will spawn a group with a specified index number. -- Uses @{DATABASE} global object defined in MOOSE. -- @param #SPAWN self --- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. +-- @return Group#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:SpawnWithIndex( SpawnIndex ) self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups } ) @@ -596,7 +596,7 @@ end -- @param self -- @param #ZONE Zone The zone where the group is to be spawned. -- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone. --- @return GROUP#GROUP that was spawned. +-- @return Group#GROUP that was spawned. -- @return #nil when nothing was spawned. function SPAWN:SpawnInZone( Zone, SpawnIndex ) self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } ) @@ -669,7 +669,7 @@ end --- Will return the SpawnGroupName either with with a specific count number or without any count. -- @param self -- @param #number SpawnIndex Is the number of the Group that is to be spawned. --- @return string SpawnGroupName +-- @return #string SpawnGroupName function SPAWN:SpawnGroupName( SpawnIndex ) self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) @@ -692,7 +692,7 @@ end --- Find the first alive group. -- @param self -- @param #number SpawnCursor A number holding the index from where to find the first group from. --- @return GROUP#GROUP, #number The group found, the new index where the group was found. +-- @return Group#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetFirstAliveGroup( SpawnCursor ) self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) @@ -712,7 +712,7 @@ end --- Find the next alive group. -- @param self -- @param #number SpawnCursor A number holding the last found previous index. --- @return GROUP#GROUP, #number The group found, the new index where the group was found. +-- @return Group#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetNextAliveGroup( SpawnCursor ) self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) @@ -753,7 +753,7 @@ end -- If no index is given, it will return the first group in the list. -- @param self -- @param #number SpawnIndex The index of the group to return. --- @return GROUP#GROUP +-- @return Group#GROUP function SPAWN:GetGroupFromIndex( SpawnIndex ) self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) diff --git a/Test Missions/lua/MOOSE_Escort_Test_Follow.lua b/Test Missions/lua/MOOSE_Escort_Test_Follow.lua index fec7080f7..9cee0fa40 100644 --- a/Test Missions/lua/MOOSE_Escort_Test_Follow.lua +++ b/Test Missions/lua/MOOSE_Escort_Test_Follow.lua @@ -8,14 +8,14 @@ do local function EventAliveHelicopter( Client ) local SpawnEscortHeli = SPAWN:New( "Escort Helicopter" ) + local SpawnEscortPlane = SPAWN:New( "Escort Plane" ) + local SpawnEscortGround = SPAWN:New( "Escort Ground" ) local EscortGroupHeli1 = SpawnEscortHeli:Spawn() - local EscortGroupHeli2 = SpawnEscortHeli:Spawn() - local EscortGroupHeli3 = SpawnEscortHeli:Spawn() - local EscortGroupHeli4 = SpawnEscortHeli:Spawn() local EscortHeli1 = ESCORT:New( Client, EscortGroupHeli1, "Escort Alpha" ) - local EscortHeli2 = ESCORT:New( Client, EscortGroupHeli2, "Escort Bravo" ) - local EscortHeli3 = ESCORT:New( Client, EscortGroupHeli3, "Escort Delta" ) - local EscortHeli4 = ESCORT:New( Client, EscortGroupHeli4, "Escort Gamma" ) + local EscortGroupPlane = SpawnEscortPlane:Spawn() + local EscortPlane = ESCORT:New( Client, EscortGroupPlane, "Escort Test Plane" ) + local EscortGroupGround = SpawnEscortGround:Spawn() + local EscortGround = ESCORT:New( Client, EscortGroupGround, "Test Ground" ) end local function EventAlivePlane( Client ) diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow.miz b/Test Missions/miz/MOOSE_Escort_Test_Follow.miz index 2114498ac..77f3e6a55 100644 Binary files a/Test Missions/miz/MOOSE_Escort_Test_Follow.miz and b/Test Missions/miz/MOOSE_Escort_Test_Follow.miz differ diff --git a/Test Missions/miz/MOOSE_Spawn_Repeat_Test.miz b/Test Missions/miz/MOOSE_Spawn_Repeat_Test.miz new file mode 100644 index 000000000..67e36ea98 Binary files /dev/null and b/Test Missions/miz/MOOSE_Spawn_Repeat_Test.miz differ