Damage taken event issues

FannyShaver

Well-Known Member
Reaction score
31
Trigger:
  • Horse Kick Initiate
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Triggering unit) Equal to Knight
      • (Learned Hero Skill) Equal to Horse Kick
    • Actions
      • Trigger - Add to Horse Kick <gen> the event (Unit - Knight Takes damage)
      • Trigger - Turn on Horse Kick <gen>


Trigger:
  • Horse Kick
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set PositionOfAttacker = (Position of (Damage source))
      • Set PositionOfKnight = (Position of Knight)
      • Set PositionOfKnight2 = (PositionOfKnight offset by 200.00 towards (Facing of Knight) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between PositionOfAttacker and PositionOfKnight2) Greater than (Distance between PositionOfKnight and PositionOfKnight2)
        • Then - Actions
          • Set Random = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Less than or equal to ((Level of Horse Kick for Knight) x 5)
            • Then - Actions
              • Set PositionOfAttacker2 = (PositionOfAttacker offset by -60.00 towards (Facing of (Damage source)) degrees)
              • Special Effect - Create a special effect at PositionOfAttacker using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Unit - Move (Damage source) instantly to PositionOfAttacker2
              • Special Effect - Create a special effect at PositionOfAttacker2 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Custom script: call RemoveLocation(udg_PositionOfAttacker2)
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_PositionOfAttacker)
      • Custom script: call RemoveLocation(udg_PositionOfKnight)
      • Custom script: call RemoveLocation(udg_PositionOfKnight2)
      • Trigger - Turn on (This trigger)


Trigger actually starts, but problem is, that this action is being launched few times for single unit that deals damage only once!

Same with this one:

Trigger:
  • Lightning Tower Attack
    • Events
    • Conditions
      • (Unit-type of (Damage source)) Equal to Lightning Tower
    • Actions
      • Set DamageSource = (Damage source)
      • Unit - Remove You Solo from DamageSource
      • Unit - Remove Soloing Player buff from DamageSource
      • Unit - Add Unit Inventory (Undead) to DamageSource
      • Hero - Create Item Permanent Damage Gain +1 and give it to DamageSource
      • Unit - Remove Unit Inventory (Undead) from DamageSource
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (solo1 <gen> contains (Damage source)) Equal to True
              • (solo2 <gen> contains (Damage source)) Equal to True
              • (solo3 <gen> contains (Damage source)) Equal to True
              • (solo4 <gen> contains (Damage source)) Equal to True
              • (solo5 <gen> contains (Damage source)) Equal to True
              • (solo6 <gen> contains (Damage source)) Equal to True
              • (solo7 <gen> contains (Damage source)) Equal to True
              • (solo8 <gen> contains (Damage source)) Equal to True
              • (solo9 <gen> contains (Damage source)) Equal to True
              • (solo10 <gen> contains (Damage source)) Equal to True
              • (solo11 <gen> contains (Damage source)) Equal to True
              • (solo12a <gen> contains (Damage source)) Equal to True
              • (solo12b <gen> contains (Damage source)) Equal to True
              • (solo13 <gen> contains (Damage source)) Equal to True
              • (solo14 <gen> contains (Damage source)) Equal to True
              • (solo15 <gen> contains (Damage source)) Equal to True
              • (solo16 <gen> contains (Damage source)) Equal to True
        • Then - Actions
          • Unit - Add You Solo to DamageSource
        • Else - Actions


Anyone could say what's wrong? I added turn on/off in hope it will fix the issue, it haven't.
 

Dirac

22710180
Reaction score
147
You're adding the same event for the trigger multiple times... you see, everytime the unit learns "Horse Kick" and that counts for every time it levels it, it adds the event, so the trigger will fire multiple times for each time the unit has learned the skill.

If you plan to continue using GUI i recommend you to use GDD, otherwise use my Damage library
 

FannyShaver

Well-Known Member
Reaction score
31
Fine, but second one uses this only once.

Trigger:
  • Trigger - Add to Lightning Tower Attack <gen> the event (Unit - AncientDG Takes damage)
    • Trigger - Add to Lightning Tower Attack <gen> the event (Unit - AncientBrown Takes damage)


Let me see what happens if I turn initiating trigger off after first use...

/edit

You are 100% right, it did helped. As soon as turned off once it's all okay, but what about the second trigger? It's loaded with Event only once and is never reloaded again?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top