| 01-27-2007, 11:39 PM | #1 |
I changed The TriggerRegisterEnterRectSimple to TriggerRegisterEnterRegion and i seem to have messed it up. JASS:function Trig_Move_North_Human_Conditions takes nothing returns boolean return GetUnitTypeId(GetFilterUnit()) == 'hfoo' or GetUnitTypeId(GetFilterUnit()) == 'hsor' endfunction function Trig_Move_North_Human_Actions takes nothing returns nothing call IssuePointOrder( GetEnteringUnit(), "attack", GetUnitX( gg_unit_nzlc_0012 ),GetUnitY( gg_unit_nzlc_0012 ) ) endfunction //=========================================================================== function InitTrig_Move_North_Human takes nothing returns nothing local region r = CreateRegion() call RegionAddRect( r, gg_rct_Human_Unit_Spawn_Top ) set gg_trg_Move_North_Human = CreateTrigger( ) call TriggerRegisterEnterRegion( gg_trg_Move_North_Human, r, Condition(function Trig_Move_North_Human_Conditions) ) call TriggerAddAction( gg_trg_Move_North_Human, function Trig_Move_North_Human_Actions ) call RemoveRegion(r) set r = null endfunctionp |
| 01-28-2007, 01:21 AM | #2 |
I think the region should stay in memory after you set the event. But im not sure. |
