• 🏆 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] Does this trigger leak?

Status
Not open for further replies.
  • Ground Quake
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ground Quake
    • Actions
      • Set LVL = (Level of (Ability being cast) for (Triggering unit))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Temppoint = (Position of (Triggering unit))
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 0.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint)
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Set Temppoint = (Position of (Triggering unit))
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 90.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint)
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Set Temppoint = (Position of (Triggering unit))
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 180.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint)
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Set Temppoint = (Position of (Triggering unit))
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 270.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint)
          • Custom script: call RemoveLocation(udg_Temppoint2)
 
Level 3
Joined
Dec 20, 2007
Messages
44
I'm not 100% sure on the locations leaking, but I do you know you're leaking units :p. Should probably add a Unit - Remove (Last created unit) from the game (or whatever it is) before each new unit is created.

EDIT: I'm pretty sure adding a generic expiration timer also works, and might cause fewer issues.
 
since it sets a new point every integer A value.


EDIT: oh, i see what you mean.

but it doesnt leak right?
  • Ground Quake
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ground Quake
    • Actions
      • Set LVL = (Level of (Ability being cast) for (Triggering unit))
      • Set Temppoint = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 0.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 90.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 180.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint2)
          • Unit - Create 1 Dummy (fissures) for (Owner of (Triggering unit)) at Temppoint facing ((Facing of (Triggering unit)) + 270.00) degrees
          • Unit - Set level of Fissures for (Last created unit) to LVL
          • Set Temppoint2 = (Temppoint offset by ((Real((Integer A))) x 75.00) towards ((Facing of (Last created unit)) + ((Random real number between 0.00 and 30.00) - (Random real number between 0.00 and 30.00))) degrees)
          • Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory Temppoint2
          • Custom script: call RemoveLocation(udg_Temppoint2)
      • Custom script: call RemoveLocation(udg_Temppoint)
Updated
 
but im still not convinced.

because it might just be my crappy computer, but i feel that it lags more than it should.

maybe it's this trigger that leaks?

  • Ground Quake Frosty Slash dummy
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Dummy (frosty Slash)
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 1
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 2
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 3
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 4
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 5
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 6
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 7
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 8
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 9
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 10
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Dummy (frosty Slash)
        • Then - Actions
          • Unit - Order (Triggering unit) to Human Mountain King - Thunder Clap
        • Else - Actions
          • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
but im still not convinced.

because it might just be my crappy computer, but i feel that it lags more than it should.

maybe it's this trigger that leaks?

  • Ground Quake Frosty Slash dummy
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Dummy (frosty Slash)
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 1
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 2
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 3
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 4
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 5
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 6
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 7
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 8
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 9
          • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Quake) 10
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Dummy (frosty Slash)
        • Then - Actions
          • Unit - Order (Triggering unit) to Human Mountain King - Thunder Clap
        • Else - Actions
          • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp

1) I assume you create those dummies with other triggers, in which case you shouldn't use this trigger but simply make (last created unit) cast thunder clap / war stomp when it's created.
2) You should remove the dummy units. I don't see your other triggers, so I'm assuming you're never actually killing those dummies.
3) Rather than using 10 different dummy units for Ground Quake, use 1 dummy unit, and set the level of your dummy war stomp to 1 - 10.

If you lag each time you use a spell, there's more chance you're doing something wrong with the spell rather than having any serious leaks. Serious leaks will simply lag your whole game, not just only when you use a spell.
 
1) they are not created with triggers, they are created with Pocket Factory ability and i cant find a way to detect when it spawns (unit spawns a summoned unit doesnt work)

2) they have negative life regeneration

3) since i cannot detect when the unit gets created from which level, i can't set the level of the ability.. of course i would do this.
 
Level 11
Joined
Nov 15, 2007
Messages
781
Does it need to be based off of pocket factory? Could do a triggered version of pocket factory, might reduce your lag issues and would be easier to set levels/detect units.
 
Status
Not open for further replies.
Top