• 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] Will this leak?

Status
Not open for further replies.
Level 1
Joined
May 15, 2007
Messages
88
I just made a trigger to respawn an unit, since it won't work with "If Unit Dies" Because it only explodes(By being attacked by Siege), but I need to know if the trigger will leak,

Thanks.

(PS: There weren't anything in Ralle's post about this type of trigger, so I can't know if it will leak or not, though I had experiences with a similiar trigger(Other "Wait Until" actions) Leaking)

Note: Changed bottom trigger to this:

  • Respawnt
    • Events
      • Unit - A unit enters Enterexitgroup <gen>
    • Conditions
    • Actions
      • Wait until ((((Triggering unit) is dead) Equal to True) or ((Enterexitgroup <gen> contains (Triggering unit)) Equal to False)), checking every 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is dead) Equal to True
        • Then - Actions
          • Wait 10.00 seconds
          • Unit - Create 1 WannabeSmartie for (Owner of (Triggering unit)) at (Center of ContStartup <gen>) facing Default building facing degrees
        • Else - Actions
          • Do nothing




  • Respawnt
    • Events
      • Unit - A unit enters Enterexitgroup <gen>
    • Conditions
    • Actions
      • Wait until ((((Triggering unit) is dead) Equal to True) or ((Enterexitgroup <gen> contains (Triggering unit)) Equal to False)), checking every 0.10 seconds
      • Wait 10.00 seconds
      • If (((Triggering unit) is dead) Equal to True) then do (Unit - Create 1 WannabeSmartie for (Owner of (Triggering unit)) at (Random point in ContStartup <gen>) facing Default building facing degrees) else do (Do nothing)
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Why should this leak ?

[Edit] actualy the second one leak.
"Create at a random place in..." creates a point which leaks.
Set a Point variable to a random place in your region and then create the unit in that point.
Then remove the point with a custom script of course.
 
Level 1
Joined
May 15, 2007
Messages
88
^
|
|
But will it leak if I just use trigger #1 ?
Because I won't use #2, since trigger #1 was a better solution.



Another trigger I made leaked like *Beepzor*;

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Wait until ((Terrain type at (Position of (Triggering unit))) Equal to Lordaeron Summer - Dirt), checking every 0.10 seconds
      • Unit - Kill (Triggering unit)

The trigger in my first post seemed similiar(due to "Wait until" action.

;)
Hence, I asked.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Waits have nothing to do with leaks.
Locations do.

"Wait until ((Terrain type at (Position of (Triggering unit))) Equal to Lordaeron Summer - Dirt), checking every 0.10 seconds"

The bold part leaks.

As I said, you should set a Point variable to "position of triggering unit" and then remove it with the point removing script.

In case you don't know it
  • Custom script: call RemoveLocation(udg_Your-Point's-Name)
 
Level 3
Joined
Dec 28, 2007
Messages
46
a "wait until" wont leak. but it will use up resources until the condition is met. the more frequent it has to check the more resources it will use. e.g. if you check every .1 seconds for 5 conditions your map with slow like crazy.
 
Status
Not open for further replies.
Top