• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Leaks

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
I'm just going to post Triggers and i need someone to check if they leak. and to repost the trigger but fixed. When the trigger has been fixed i'll remove it from the list.
Trigger 2 CAUSES MASS LAG!
  • Untitled Trigger 009
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Defeat
    • Actions
      • -------- Direct dmg --------
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Defeat for (Triggering unit)) Equal to (Integer A)
            • Then - Actions
              • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (750.00 x (Real((Level of Defeat for (Triggering unit))))) damage of attack type Spells and damage type Normal
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
      • -------- dmg per second --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 100
        • Then - Actions
          • Unit - Add Defeat Buff to (Target unit of ability being cast)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 200
            • Then - Actions
              • Unit - Add Defeat Buff 2 to (Target unit of ability being cast)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 300
                • Then - Actions
                  • Unit - Add Defeat Buff 3 to (Target unit of ability being cast)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 400
                    • Then - Actions
                      • Unit - Add Defeat Buff 4 to (Target unit of ability being cast)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Strength of (Target unit of ability being cast) (Include bonuses)) Greater than or equal to 401
                        • Then - Actions
                          • Unit - Add Defeat Buff 5 to (Target unit of ability being cast)
                        • Else - Actions
  • Untitled Trigger 013
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to True Aura True
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of True Aura True for (Triggering unit)) Equal to (Integer A)
            • Then - Actions
              • Unit - Add True Aura to (Triggering unit)
              • Unit - Set level of True Aura for (Triggering unit) to (Level of True Aura True for (Triggering unit))
              • Player - Disable True Aura for (Owner of (Triggering unit))
              • Wait 30.00 seconds
              • Unit - Remove True Aura from (Triggering unit)
            • Else - Actions
 
Last edited:
Level 18
Joined
Mar 13, 2009
Messages
1,411
For the second one I would use an integer:

For each integer A from 1 to 10
And
If - (Level of True Aura True for (Triggering unit)) Equal to Integer A
Then - Unit - Set level of True Aura for (Triggering unit) to Integer A

For the first one you might be able to do Level x 750 damage.

I can't find any leaks.

You add True Aura and disable it? Spell Book?
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
  • Untitled Trigger 013
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to True Aura True
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of True Aura True for (Triggering unit)) Equal to (Integer A)
        • Then - Actions
          • Unit - Add True Aura to (Triggering unit)
          • Unit - Set level of True Aura for (Triggering unit) to (Integer A)
        • Else - Actions
So that should work for number 2?
its passive skills that the unit gets for a set time
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
I would try to make it this way:

  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to True Aura True
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of True Aura True for (Triggering unit)) Equal to (Integer A)
            • Then - Actions
              • Unit - Add True Aura to (Triggering unit)
              • Unit - Set level of True Aura for (Triggering unit) to (Integer A)
              • Player - Disable True Aura for (Owner of (Triggering unit))
              • Wait 30.00 seconds
              • Unit - Remove True Aura from (Triggering unit)
            • Else - Actions
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
ya from letting a player keep activating the auras
the first one i posted works but the mass leak spike makes the skill a bit lame
 
Level 5
Joined
Apr 21, 2006
Messages
82
Well i don't see leaks either, i tried to think some kind of loops to make the trigger more simple but couldn't invent any for now only the 1st part of the 1st trigger.


  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Defeat
  • Actions
    • -------- Direct dmg --------
    • For each (Integer A) from 1 to 2, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Defeat for (Triggering unit)) Equal to (Integer A)
          • Then - Actions
            • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
            • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (750.00 x (Integer((Level of Defeat for (Triggering Unit)))) damage of attack type Spells and damage type Normal
            • Special Effect - Destroy (Last created special effect)
The 2nd one as Billy The Cat said you could do it his way.
Maybe there is some other trigger running at the same time as the 2nd trigger which could possible cause the lag?
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
For trigger 2:
Trigger 2
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to True Aura True
  • Actions
    • Unit - Add True Aura to (Triggering unit)
    • Unit - Set level of True Aura for (Triggering unit) to (Level of True Aura True for (Triggering Unit))
    • Player - Disable True Aura for (Owner of (Triggering unit))
    • Wait 30.00 seconds
    • Unit - Remove True Aura from (Triggering unit)
This'll make it shorter.
What i dont get is why you disable the aura when you give it.Anyway, you should re-enable it afterwards.
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Reaper2008 is right about the trigger. Stick with his one. I forgot the option to set:
  • Unit - Set level of True Aura for (Triggering unit) to (Level of True Aura True for (Triggering Unit))
His one is simply better as mine D:

His trigger also works for more as 10 levels and not just for 1. As long as your spell got 10 levels his trigger will work for 10.

Like I aslo asked earlier: why are you disabling the spell? It doesn't make sense to me unless it is supposed to be a Spell Book ability :p
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
the spell book has 3 auras in it n cause i dont want room to be taken up for those 30 seconds i disabled it
the lag is down to a i would say a .5 second lag spike
so really you dont even really notice it anymore
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
yeah well its not really noticeable anymore which is all i wanted
cause i want to try and get back to working on the map these are for
i reposted the ones i have right now that u guys give me
 
Status
Not open for further replies.
Top