function Ally_Attack takes nothing returns boolean
local unit u = GetAttacker()
if IsUnitEnemy( GetTriggerUnit(), GetOwningPlayer( u ) )
call IssueImmediateOrder( u, "stop" )
endif
set u = null
return false
endfunction
function InitTrig_Ally_Attack takes nothing returns nothing
set gg_trg_Ally_Attack = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ally_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Ally_Attack, Condition( function Ally_Attack )
endfunction