Trigger help

vespt

New Member
Reaction score
4
Well... I have this trigger thats not working and I dont know why :X

Its quite simple

Code:
Shield of Honor var
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Shield of Honor 
    Actions
        Set SH_lvl = (Level of Shield of Honor  for (Triggering unit))

Code:
Shield of Honor
    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 (Real(SH_lvl)))))

Thx in adv :D
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Maybe you should say what doesn't work? :nuts:
 

Romek

Super Moderator
Reaction score
963
"A unit is attacked" doesn't give you a "Damage Taken"
You'll need a damage detection system for that. (Which is surprisingly easy to make for a spell like this)

Just make another trigger which runs at map init and uses a unit group loop. It picks every unit on the map and adds the event: "Picked Unit is damaged" to your second trigger. Then make (yet) another trigger which adds the event when a unit enters [playable map area].
 

vespt

New Member
Reaction score
4
Didnt understood quite well :X

what should i do in the trigger that i creat that picked every unit in map?!
And after that....

Sorry for any inconvinient :p

Thx


double post soz
 

PrisonLove

Hard Realist
Reaction score
78
Unit - A unit Starts the effect of an ability

thats a problem. teh event should be something along the lines of a unit learns a skill

and the condition should be

learned skill equal to YourSkill
 

PrisonLove

Hard Realist
Reaction score
78
actually i misread those triggers and mistook it to be a passive ability. my apologies
 

WilliamPa

Active Member
Reaction score
51
1. The spell heals which may be weird with event "unit is attacked". I think all spells will not launch that trigger.
2. Better use Takes Damage event in second trigger, or the action will return nothing as damage weren't taken, and it x'es the heal.
And here's easy math version for it if you still didn't get that :p
Nothing(world editor refers to 0 i think) x 0.2 x 1 = 0
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top