Shield spell problem

Mishtiff

New Member
Reaction score
0
Hey guys, im having a problem with this trig. i used this other post as a reference: http://www.thehelper.net/forums/showpost.php?p=1055805&postcount=3

What happens in game is: The shielded target does absorb the damage, but after the buff fades, and another shield is cast, it doubles the previous absorbed amount, meaning the unit starts to gain health instead of absorb it... almost like the triggers are doubling over?

Priest Shield On
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Shield
Actions
Set Dummy_Unit = (Target unit of ability being cast)
Trigger - Add to Priest Shield <gen> the event (Unit - Dummy_Unit Takes damage)

------------
Priest Shield
Events
Conditions
((Triggering unit) has buff Shielded) Equal to True
Actions
Game - Display to Player Group - Player 1 (Red) the text: (String((Damage taken)))
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
Trigger - Remove (This trigger) from the trigger queue




thanks for the help everyone.
 

Shura

New Member
Reaction score
45
Try making a trigger that will add the event when a unit enters the map instead of when the ability is cast. Then you won't need your first trigger, the ability will just need to apply the buff.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
That's because you ARE doubling up the trigger.

Each time you cast:

Trigger:
  • Priest Shield On
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shield
    • Actions
      • Set Dummy_Unit = (Target unit of ability being cast)
      • Trigger - Add to Priest Shield &lt;gen&gt; the event (Unit - Dummy_Unit Takes damage)
...a second event is being added for that unit, so the trigger Priest Shield will run twice for every time the unit takes damage, then tree times, and so on.

If you re-read the post you linked, vypur85 incorporated a check to prevent doubling-up by adding the unit to a unit group, and not creating another damage event if the unit is in that group.

All that aside, the method mentioned in the post you linked works, but leaks. I'd suggest instead adopting a damage detection system, such as GDD for GUI spells.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top