romanandre
New Member
- Reaction score
- 2
I want unit A to attack unit B target when unit B automatically without ordering unit B to attack.
Just a exemple.
Unit B is in "aggro" range of creep and unit B automatically attack the creep , I want the Unit A to attack the same target , can anyone help.
I almost got that with this code.
function Trig_Shadow_Orbs_3_Actions takes nothing returns nothing
call IssueTargetOrder( udg_AvatarUnit, "attack", GetTriggerUnit() ) // this unit is probaly the problem
endfunction
//===============================================================
function InitTrig_Debug_Order_1 takes nothing returns nothing
set gg_trg_Debug_Order_1 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Debug_Order_1, udg_AvatarCaster, EVENT_UNIT_ACQUIRED_TARGET )
call TriggerAddAction( gg_trg_Debug_Order_1, function Trig_Shadow_Orbs_3_Actions )
endfunction
Sometimes the unit A attack another unit and sometimes unit A doesn't even move.
Thanks for helping, any questions just ask.
Just a exemple.
Unit B is in "aggro" range of creep and unit B automatically attack the creep , I want the Unit A to attack the same target , can anyone help.
I almost got that with this code.
function Trig_Shadow_Orbs_3_Actions takes nothing returns nothing
call IssueTargetOrder( udg_AvatarUnit, "attack", GetTriggerUnit() ) // this unit is probaly the problem
endfunction
//===============================================================
function InitTrig_Debug_Order_1 takes nothing returns nothing
set gg_trg_Debug_Order_1 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Debug_Order_1, udg_AvatarCaster, EVENT_UNIT_ACQUIRED_TARGET )
call TriggerAddAction( gg_trg_Debug_Order_1, function Trig_Shadow_Orbs_3_Actions )
endfunction
Sometimes the unit A attack another unit and sometimes unit A doesn't even move.
Thanks for helping, any questions just ask.