Can anyone point out why this doesn't work?

Status
Not open for further replies.
Level 2
Joined
Dec 22, 2010
Messages
16
So once again i was working on a skill for a hero in my AoS map, and it looks like it should work to me, so if anyone can point out what is wrong it would be awesome.

This is the trigger that the hero gets from the passive dummy ability:
  • Beacon of Justice
    • Events
      • Time - Every (((Real((Level of Beacon of Justice for Judge 0000 <gen>))) + 5.00) - (5.00 x (Real((Level of Beacon of Justice for Judge 0000 <gen>))))) seconds of game time
    • Conditions
      • (Level of Beacon of Justice for (Triggering unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Beacon of Justice for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Create 1 dummy unit for (Owner of Judge 0000 <gen>) at (Center of (Playable map area)) facing Default building facing degrees
          • Unit - Add Beacon of Justice Damage (Archimonde) to (Last created unit)
          • Unit - Set level of Beacon of Justice Damage (Archimonde) for (Last created unit) to (Level of Beacon of Justice for Judge 0000 <gen>)
          • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge 0000 <gen>)))
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Beacon of Justice for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit - Create 1 dummy unit for (Owner of Judge 0000 <gen>) at (Center of (Playable map area)) facing Default building facing degrees
              • Unit - Add Beacon of Justice Damage (Archimonde) to (Last created unit)
              • Unit - Set level of Beacon of Justice Damage (Archimonde) for (Last created unit) to (Level of Beacon of Justice for Judge 0000 <gen>)
              • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge 0000 <gen>)))
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Beacon of Justice for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit - Create 1 dummy unit for (Owner of Judge 0000 <gen>) at (Center of (Playable map area)) facing Default building facing degrees
                  • Unit - Add Beacon of Justice Damage (Archimonde) to (Last created unit)
                  • Unit - Set level of Beacon of Justice Damage (Archimonde) for (Last created unit) to (Level of Beacon of Justice for Judge 0000 <gen>)
                  • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge 0000 <gen>)))
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Beacon of Justice for (Triggering unit)) Equal to 4
                    • Then - Actions
                      • Unit - Create 1 dummy unit for (Owner of Judge 0000 <gen>) at (Center of (Playable map area)) facing Default building facing degrees
                      • Unit - Add Beacon of Justice Damage (Archimonde) to (Last created unit)
                      • Unit - Set level of Beacon of Justice Damage (Archimonde) for (Last created unit) to (Level of Beacon of Justice for Judge 0000 <gen>)
                      • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge 0000 <gen>)))
                      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
And this is the trigger for the ability the dummy unit casts:
  • Beacon of Justice dmg and heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beacon of Justice Damage (Archimonde)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 1
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x 0.01) damage of attack type Chaos and damage type Divine
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 2
                • Then - Actions
                  • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x 0.02) damage of attack type Chaos and damage type Divine
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 3
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x 0.03) damage of attack type Chaos and damage type Divine
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 4
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x 0.04) damage of attack type Chaos and damage type Divine
                        • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 1
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) x 0.01))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 2
                • Then - Actions
                  • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) x 0.02))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 3
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) x 0.03))
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Beacon of Justice Damage (Archimonde) for (Triggering unit)) Equal to 4
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) x 0.04))
                        • Else - Actions
 
Level 2
Joined
Dec 22, 2010
Messages
16
Woops, totally forgot to change those! >_> I am stupid xD, i forgot to make the caster a variable -_-.

and leaks can actually stop something from working? I thought they just built up and made the game lag, so I was going to clear them when i was done.

and that is not supposed to be the center of the map >_>
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You're using triggering unit in the first trigger, but the event produces no triggering unit. There is not triggering unit.

Only the events under unit menu produce triggering unit. You're using time related event.

For the damage trigger, get rid of the if/then/elses and use damage = life x 0.01 x ability level

You need to use integer to real conversion with the ability level.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Set Variable Action in GUI is known as Global Variable
You save the data in the Trigger A, then you want to use it in Trigger B, you can use the previous saved variable in Trigger A
Since you have saved the variable(s), you can easily use it in-between ANY triggers
That's the function of Variable, saving data, from trigger to trigger
 
Level 2
Joined
Dec 22, 2010
Messages
16
is this more like it?

Dummy passive
  • Beacon of Justice
    • Events
    • Conditions
      • (Level of Beacon of Justice for (Triggering unit)) Greater than 0
    • Actions
      • Set Judge = (Triggering unit)
      • Trigger - Add to (This trigger) the event (Time - Every (((Real((Level of Beacon of Justice for Judge))) + 5.00) - (5.00 x (Real((Level of Beacon of Justice for Judge))))) seconds of game time)
      • Unit - Create 1 dummy unit for (Owner of Judge) at (Position of Judge) facing Default building facing degrees
      • Unit - Add Beacon of Justice damage (Archimonde) to (Last created unit)
      • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge)))
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Ability the dummy unit casts
  • Beacon of Justice dmg and heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beacon of Justice damage (Archimonde)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an enemy of (Owner of Judge)) Equal to True
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) x (0.01 x (Real((Level of Beacon of Justice for Judge))))) damage of attack type Chaos and damage type Divine
        • Else - Actions
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) x (0.01 x (Real((Level of Beacon of Justice for Judge))))))
It still does not work for me, why must I suck so much! :vw_wtf: :vw_wtf: :vw_wtf:
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
is this more like it?

Dummy passive
  • Beacon of Justice
    • Events
    • Conditions
      • (Level of Beacon of Justice for (Triggering unit)) Greater than 0
    • Actions
      • Set Judge = (Triggering unit)
      • Trigger - Add to (This trigger) the event (Time - Every (((Real((Level of Beacon of Justice for Judge))) + 5.00) - (5.00 x (Real((Level of Beacon of Justice for Judge))))) seconds of game time)
      • Unit - Create 1 dummy unit for (Owner of Judge) at (Position of Judge) facing Default building facing degrees
      • Unit - Add Beacon of Justice damage (Archimonde) to (Last created unit)
      • Unit - Order (Last created unit) to Special Archimonde - Finger Of Death (Random unit from (Units within 400.00 of (Position of Judge)))
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
The event you're using is TIME event not UNIT event. Therfore there IS NO TRIGGERING UNIT!

What are you trying to do with this trigger?
 
Level 2
Joined
Dec 22, 2010
Messages
16
Oh wow -_-, I went back to re-write those and U totally forgot to change the variable. I am so dumb, does everything else look clean though?

The hero is a support, and instead of him having a direct heal I wanted him to have a passive that heals or damages an enemy in the area of effect.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I told you, you need to click on the links to what I have posted in post #2
That "How You Clean Leaks" link
Click it and read it
Your trigger will remain "leaked" if you don't input this command in it
  • Custom script: call RemoveLocation(udg_"VariableName")
Action above is for removing leaks on POINT-type leaks
One of the example of leak-cleaning method
 
Status
Not open for further replies.
Top