HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to use CS_EnumUnitsInAOE

05-17-2006, 10:29 AM#1
poz
function CS_EnumUnitsInAOE takes group g, real x, real y, real area, boolexpr bx returns nothing

I cant get an idea how to use these function, it doesn't return any value so how am i suppose to get track on the unit group i'm enuming?

ADD: One more Question about Caster System: can OnAbilityEffect uses multiple times on a same trigger? eg:

Collapse JASS:
function InitTrig_Quicken takes nothing returns nothing
    call OnAbilityEffect('A001',"Trig_Quicken_Actions")
    call OnAbilityEffect('A002',"Trig_Quicken_Actions")
    call OnAbilityEffect('A003',"Trig_Quicken_Actions")
endfunction

Will it cause any problem?
05-17-2006, 12:43 PM#2
Vexorian
Multiple spells can use the same function, but one spell cannot use more than one function, so in your case that's right.

In JASS , all types that are derived from handle behave like pointers, CS_EnumUnitsInAOE behaves like a native function called GroupEnumUnitsInRange , and what CS_EnumUnitsInAOE does is Adding the units in the AOE to the unit group you passed it as argument, so the group is at the same time an argument and the result of the function
05-17-2006, 01:10 PM#3
poz
So it means that if I call the CS_EnumUnitsInAOE with a variable say udg_tempUnitGroup it will add all the units into this variable?
05-17-2006, 01:57 PM#4
Vexorian
not to the variable but to the group pointed by the variable