| 07-18-2009, 11:28 AM | #1 |
Trigger: Hey I was wondering how to do that in JASS cos when i convert it to custom text it splits into two actions which I don't know how to get around yet hahaha. EDIT: Offsets are only 0, 0 becausei plan on changing it when it's in jass form. excuse informality of this post as im not how you say 'sober' |
| 07-18-2009, 11:46 AM | #2 |
Answered in chat. JASS:loop set u = FirstOfGroup( yourGroup ) exitwhen u == null <youractions> call GroupRemoveUnit( yourGroup, u ) endloop |
| 07-18-2009, 11:53 AM | #3 |
JASS:scope Colonization private function Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A00K' endfunction private function Actions takes nothing returns nothing local IslandData dat = IslandCount[GetUnitId(GetTriggerUnit())] call GroupEnumUnitsInRange(ENUM_GROUP ,GetUnitX(gg_unit_htow_0000)+1536.03 * I2R(dat.SelectedX),GetUnitY(gg_unit_htow_0000)+1536.03 * I2R(dat.SelectedX),1000) loop set u = FirstOfGroup( ENUM_GROUP ) exitwhen u == null call SetUnitOwner( u, GetOwningPlayer(GetTriggerUnit()), true ) call GroupRemoveUnit( ENUM_GROUP, u ) endloop endfunction ////////////////////////////////////////////////////// public function InitTrig takes nothing returns nothing local trigger t = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_FINISH) call TriggerAddCondition(t, Filter(function Conditions)) call TriggerAddAction(t, function Actions) endfunction endscope |
| 07-18-2009, 01:24 PM | #4 | |
Quote:
since i can't see any wait in your actions part, you might as well merge your actions block into your conditions block, saves one function call at init, and a little speed at runtime. But main reason i'm telling this to you is that you're not doing it already ~ |
