Enable Attack 1 - Attack 2

Status
Not open for further replies.

I Burn Stuff

I

I Burn Stuff

Is there a way to enable Attack 1 and Attack 2 via an iteam and/or trigger?
 
I see only one way – dark way :) - trigger way. You must turn on this triggers when you have requested items (items themselves are dummy items – they do nothing). Try something like this:

Trigger for melee attack

Events – unit is attacked
Conditions – attacking unit = your hero {NOTICE! You can also ‘put’ here a condition ‘has item of type’, but I strongly recommend you to use turn on trigger/turn of trigger}
Actions – set life of triggering unit = life of triggering unit – (here must be your bonus damage; use variables for different items)

Trigger for ranged attack

Event – unit is attacked
Conditions – attacking unit = your hero
Actions – (here goes custom script)
Code:
 local location loc1
   local location loc2
   local unit u
   set u = GetTriggerUnit()
   set loc1 = GetUnitLoc (u)
   set loc2 = GetUnitLoc(GetAttacker())
   call PolledWait (DistanceBetweenPoints(loc1, loc2))
   call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, u) - 25.00 ) ) (for example) 
   call RemoveLocation(loc1)
   call RemoveLocation(loc2)
 
I think that's not what he means..

Try to use orb item, it will enable attack 1 or 2 to the carrier. Or try custom upgrade, to enable/disable attack 1 or 2. apply this upgrade to the unit that you want. Then, make a 'trigger on' to set the research level of this upgrade to 1 and 'trigger off' to set research level of this upgrade to 0.
 
How would I disable an attack... I only see and enable option under item or upgrades.
 
Status
Not open for further replies.
Back
Top