• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Nobish Question Ever! XD

Status
Not open for further replies.
It IS possible in GUI, it will just leak


I've done it in GUI, how does it leak?


  • Add Damage Trig
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • <<Conditions>>
    • Actions
      • Trigger - Add to Damage Trig <gen> the event (Unit - (Entering unit) Takes damage)
  • Add Damage Trig 2
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Damage Trig <gen> the event (Unit - (Entering unit) Takes damage)
  • Damage Trig
    • Events
    • Conditions
    • Actions
      • Unit - Kill (Damage source)
Basically, either when a unit Enters A Region or when it is picked by a Pick Every Unit you can add an event to another trigger. This lets you add every unit you want the Damage Trig to consider.
 
The events last forever. Also, that group there is leaking. Finally, you're getting multiple events for the same units.

The only real issue is that the events last forever, since there's no way to remove them once the unit dies.

I simply didn't kill the group (not too familiar with leak extermination) so one could do that and no leaks there.

Not sure what you mean by multiple events for the same units, you should only use one of those Add Damage Trigs.
 
He means that everytime a unit enters the region a new event will be created(an event is also an object that has to be removed!)
It will leak the hell outta your ass using that trigger(especielly if the group leaks arent fixed)
Just use shadow1500's which PP just linked, it is easy to use and jass knowledge isn't really neccesary to implement it.
 
He means that everytime a unit enters the region a new event will be created(an event is also an object that has to be removed!)
It will leak the hell outta your ass using that trigger(especielly if the group leaks arent fixed)
Just use shadow1500's which PP just linked, it is easy to use and jass knowledge isn't really neccesary to implement it.

It's the playable map area, meaning the entire map...that's rather the point. Just use a Condition or two to specialize the type of unit you're looking for, such as Unit-Type. This isn't the kind of trigger you want for every unit, I do know that.

I didn't design the trigger to be leak-free, just an example of how it could be implemented.

One question I have: you say an event is also an object that has to be removed. Does that mean that you can remove an event from a trigger in the same way you can add one? I don't see any GUI actions to do that, but GUI is GUI.
 
This thread has been moved from the World Editor Help Zone to the Triggers (GUI) Forum. A redirection link has been left in the original forum to provide a conection between the original place and the new location of this thread. This redirection link will expire in 24 hours.
 
Last edited:
Status
Not open for further replies.
Back
Top