• 🏆 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] Nobish Question Ever! XD

Status
Not open for further replies.
Level 6
Joined
Oct 22, 2006
Messages
184
Please be more specific...
Is this what you want though?
  • Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing damage damage of attack type Normal and damage type Normal
 
Level 5
Joined
Jun 23, 2004
Messages
126
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.
 
Level 5
Joined
Jun 23, 2004
Messages
126
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.
 
Level 10
Joined
Nov 10, 2004
Messages
351
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.
 
Level 5
Joined
Jun 23, 2004
Messages
126
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.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
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.
Top