| 08-09-2006, 12:12 AM | #1 |
I was just wondering why this is crashing Wc3 instantly without an error message. Trigger: JASS:function Trig_KillOrders_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetOrderedUnit(), UNIT_TYPE_UNDEAD) == true ) ) then return false endif return true endfunction function Trig_KillOrders_Func001C takes nothing returns boolean if ( not ( GetUnitUserData(GetOrderedUnit()) == 0 ) ) then return false endif return true endfunction function Trig_KillOrders_Func002C takes nothing returns boolean if ( not ( GetUnitUserData(GetOrderedUnit()) == 1 ) ) then return false endif return true endfunction function Trig_KillOrders_Func003C takes nothing returns boolean if ( not ( GetUnitUserData(GetOrderedUnit()) == 2 ) ) then return false endif return true endfunction function Trig_KillOrders_Func004C takes nothing returns boolean if ( not ( GetUnitUserData(GetOrderedUnit()) == 3 ) ) then return false endif return true endfunction function Trig_KillOrders_Actions takes nothing returns nothing if ( Trig_KillOrders_Func001C() ) then call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetRectCenter(gg_rct_Player1END) ) else endif if ( Trig_KillOrders_Func002C() ) then call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetRectCenter(gg_rct_Player2END) ) else endif if ( Trig_KillOrders_Func003C() ) then call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetRectCenter(gg_rct_Player3END) ) else endif if ( Trig_KillOrders_Func004C() ) then call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetRectCenter(gg_rct_Player4END) ) else endif endfunction //=========================================================================== function InitTrig_KillOrders takes nothing returns nothing set gg_trg_KillOrders = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_KillOrders, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER ) call TriggerAddCondition( gg_trg_KillOrders, Condition( function Trig_KillOrders_Conditions ) ) call TriggerAddAction( gg_trg_KillOrders, function Trig_KillOrders_Actions ) endfunction |
| 08-09-2006, 12:20 AM | #2 |
Infinite order loop. Enable/disable trigger when issuing order. |
