IKilledKEnny's JASS Question Theard, I love to give +REP :)

Status
Not open for further replies.
I

IKilledKEnny

Guest
Code:
function DestroyCirclesGAtions takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction

function DestroyCirclesGConditions takes nothing returns boolean
if GetPlayerSlotState(GetOwningPlayer(GetFilterUnit()))!=PLAYER_SLOT_STATE_PLAYING then
return true
endif
return false
endfunction

function DestroyCirclesAct takes nothing returns nothing
local boolexpr b=Condition(function DestroyCirclesGConditions)
local group g=GroupEnumUnitsInRect(g,GetWorldBounds(),b)
ForGrouo(g,function DestroyCirclesGAtions)
call DestroyGroup(g)
call DestroyBoolExpr(b)
set b=null
set g=null
endfunction

//===========================================================================
function InitTrig_Destroy_Circles takes nothing returns nothing
set gg_trg_Destroy_Circles = CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Destroy_Circles,1.00)
call TriggerAddAction(gg_trg_Destroy_Circles,function DestroyCirclesAct)
endfunction

Still disabled. GAtion is Group Action just that I forgot the c :p. And how could I make the condition simpler?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
AceHart already told u.....
u need to fix that and put in ForGroup not ForGrouo.

and also:
local group g=GroupEnumUnitsInRect(g,GetWorldBounds(),b)
shouldn't u first Create Group and then Group the units inside the group?
 

Sooda

Diversity enchants
Reaction score
318
Code:
function DestroyCirclesGConditions takes nothing returns boolean
if GetPlayerSlotState(GetOwningPlayer(GetFilterUnit()))!=PLAYER_SLOT_STATE_PLAYING then
return true
endif
return false
endfunction
can be:
Code:
function DestroyCirclesGConditions takes nothing returns boolean
     return GetPlayerSlotState(GetOwningPlayer(GetFilterUnit())) != PLAYER_SLOT_STATE_PLAYING 
endfunction
 
I

IKilledKEnny

Guest
Thanks, both of you, I did what you both said plus few minor corrections in it worked like a charm.

Edit:
Sooda, right of course, I'm used to do that only with spell conditions, heh.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top