hunterrravyn
TH.net Regular
- Reaction score
- 19
Editing the jass from the knockback system into gui, but i still have 1 problem... the attacked units facing.
Ive converted it to jass to try to help.
JASS:
function Trig_Attack_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 039;hpea039; ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Actions takes nothing returns nothing
call MoveRectToLoc( udg_Temp_Regon, GetUnitLoc(GetTriggerUnit()) )
call SetUnitFacingToFaceLocTimed( GetTriggerUnit(), GetRandomLocInRect(udg_Temp_Regon), 0.10 )
call UnitKnockTargetEx(GetTriggerUnit(), GetAttackedUnitBJ(), GetUnitFacing(GetTriggerUnit()), 50.00, 2.00, 1.00, "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageDeathCaster.mdl", "origin")
call RemoveRect(udg_Temp_Regon)
endfunction
//===========================================================================
function InitTrig_Attack takes nothing returns nothing
set gg_trg_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Attack, Condition( function Trig_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Attack, function Trig_Attack_Actions )
endfunction
Ive converted it to jass to try to help.