Next step of folder restructure

This commit is contained in:
kaltokri
2024-01-01 22:41:16 +01:00
parent 5aa1e1a63a
commit 286d2ed571
288 changed files with 6049 additions and 6049 deletions

View File

@@ -0,0 +1,29 @@
--- This makes a vehicle respawn itself within ZONEVEHICLE1.
-- The vehicle group consists of multiple units and are spawned in randomized within the new zone.
-- When the last vehicle of the group is destroyed, the group will respawn.
--
-- Name: GRP-620 - Respawn multiple units when destroyed
-- Author: FlightControl
-- Date Created: 01 Mar 2018
-- Find the Vehicle and create a GROUP object.
Vehicle = GROUP:FindByName( "Vehicle" )
-- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1.
RespawnZone1 = ZONE:New( "ZONEVEHICLE1")
-- Prepare the spawning to be done in RespawnZone1.
Vehicle:InitZone( RespawnZone1 )
Vehicle:InitRandomizePositionZone( true )
Vehicle:HandleEvent( EVENTS.Dead )
function Vehicle:OnEventDead( EventData )
self:E( { "Size ", Size = Vehicle:GetSize() } )
-- When the last vehicle of the group is declared dead, respawn the group.
if Vehicle:GetSize() == 1 then
-- Respawn the vehicle in RespawnZone1.
Vehicle:Respawn()
end
end