• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Any leak?

Status
Not open for further replies.
Level 2
Joined
Sep 2, 2017
Messages
6
I'm making a spells that increase damage (increase level) when you attack/approach enemy units within limited ranges and when he leaves in specific range it will auto-decrease back to default lvl (1 or 2). I was wandering if there is any leak here ( I'm not experienced enough to find any solution of this leak). Im glad if there is anyone help me.

  • Damage Stack Active 1
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Damage Stack
    • Actions
      • Set DamageStack_LearnedUnits = (Learning Hero)
      • Trigger - Turn on Damage Stack Active 2 Copy <gen>
  • Damage Stack Active 2 Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Thief
    • Actions
      • Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Attacking unit) Equal to DamageStack_LearnedUnits
          • ((Attacking unit) is in (Units within (Random real number between 85.00 and 105.00) of (Position of (Attacked unit)))) Equal to True
        • Then - Actions
          • Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 2 and 10)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Attacking unit) is in (Units within 350.00 of (Position of (Attacked unit)))) Equal to True) and ((Current order of (Attacking unit)) Equal to (Order(move)))
              • (Attacking unit) Equal to DamageStack_LearnedUnits
            • Then - Actions
              • Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 1 and 2)
            • Else - Actions
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
There are 2 unit group and 2 point leaks:
(Units within (Random real number between 85.00 and 105.00) of (Position of (Attacked unit)))
(Units within 350.00 of (Position of (Attacked unit)))) Equal to True)

You need a group and a point variable to remove them.
 
Level 2
Joined
Sep 2, 2017
Messages
6
There are 2 unit group and 2 point leaks:
(Units within (Random real number between 85.00 and 105.00) of (Position of (Attacked unit)))
(Units within 350.00 of (Position of (Attacked unit)))) Equal to True)

You need a group and a point variable to remove them.
thank you for pointing that leak
 
Status
Not open for further replies.
Top