trigger help(buffs related)

vespt

New Member
Reaction score
4
For now I have this code:

Code:
Shield of Honor  unfinished
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) has buff Shield of Honor ) Equal to True
    Actions
        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - ((Damage taken) x (0.20 x [COLOR="Red"]1.00[/COLOR])))

And I would like to substitute the red part by the level of the abilitie that put the buff at the target.

Should i creat 4 diff buffs and 1 trigg for each or there is an easier way?
 

FireBladesX

Eating my wings!
Reaction score
123
A way that I use for non-MUI maps is that I set the custom value of the Target Unit of Ability Being Cast when I initially place the buff to the Level of Ability for Triggering Unit. That way it stores the level of the ability. However, this only works if you don't use custom values anywhere else of relevance.

So then, it might look like this.

Code:
Shield of Honor  unfinished
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) has buff Shield of Honor ) Equal to True
    Actions
        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - ((Damage taken) x (0.20 x [COLOR="Red"](Real(Custom Value of [COLOR="DarkSlateBlue"]Attacked Unit[/COLOR]))[/COLOR])))

You avatar made me lol, btw :D
 

vespt

New Member
Reaction score
4
1 quertion...

Code:
Unit - Set life of (Triggering unit) to (([B]Life of (Triggering unit[/B])) + ((Damage taken) x (0.20 x (Real(SH_lvl)))))

The bold part reffers to after the attack or before?

thx in adv
 

Carl-Fredrik

New Member
Reaction score
51
1 quertion...

Code:
Unit - Set life of (Triggering unit) to (([B]Life of (Triggering unit[/B])) + ((Damage taken) x (0.20 x (Real(SH_lvl)))))

The bold part reffers to after the attack or before?

thx in adv

Ehh... good question, I think after since the trigger activates when a unit is attacked but I can't be sure :eek:
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
The bold part reffers to after the attack or before?

thx in adv

It refers when the unit is going to attack, when he plays the animation,

If you got a trigger like

A unit is attacked
Order attacking unit to stop

The attacking unit will stop before the unit is being damaged, so it's before.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top