Hi @ all.
I am trying to handle an event of a group being dead, and activating a "SpawnScheduleStop" when this happens.
I was trying to modify the "UNIT:FindByName" Class, by changing it as follows: (GROUP:FindByName)
Obviously, this wasn't right... haha :megalol:
What would be the right way to do this? I added the fraction of the code blow. :helpsmilie:
_1st_OpFor_LMLRS_Base = [color="Red"]GROUP[/color]:FindByName( "1st OpFor LMLRS Group Base" )
_1st_OpFor_LMLRS_Base:HandleEvent( EVENTS.Dead )
function _1st_OpFor_LMLRS_Base:OnEventDead( EventData )
Respawn_1st_OpFor_LMLRS:SpawnScheduleStop()
end
Thanks!!!! :-D
EDIT: Of course, above is more code, just for completion:
-- Spawner
Respawn_1st_OpFor_LMLRS = SPAWN
:New("1st Grad Platoon (OpFor)")
:InitLimit(8,0)
:SpawnScheduled(6,0)
-- Initialisation Spawns
Respawn_1st_OpFor_LMLRS:Spawn()
-- next