Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. SpawnOPFORCas = function(zone, spawn, targetGrp)
  2.     local casZone = AI_CAS_ZONE:New( zone, 100, 1500, 250, 600, zone )
  3.     local casGroup = spawn:Spawn()
  4.     targetGrp:HandleEvent(EVENTS.Dead)
  5.     function targetGrp:OnEventDead(EventData)
  6.         local grp = EventData.IniGroup
  7.         local initGrpSize = grp:GetInitialSize()
  8.         local currentInZone = grp:CountInZone(zone)
  9.         if currentInZone / initGrpSize <= 0.3 then
  10.             grp:Destroy()
  11.             casZone:Accomplish()
  12.             casZone:__RTB(5)
  13.             --casZone:RTB()
  14.         end
  15.     end
  16.     casZone:SetControllable( casGroup )
  17.     casZone:__Start ( 1 )
  18.     casZone:__Engage( 2 )
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement