• 🏆 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!

Dying Unit or Triggering Unit?

Status
Not open for further replies.

sPy

sPy

Level 21
Joined
Apr 10, 2009
Messages
268
So, I went to search some thread. And then, I saw some people recommend that using triggering unit is better than dying unit.

For Example:
  • Events
    • A unit dies
  • Conditions
  • Actions
    • Unit - Remove (Triggering Unit or Dying Unit?)
Why is triggering unit is better than dying unit?
 
Level 4
Joined
Mar 24, 2008
Messages
87
For memory, using Dying unit instead of Triggering unit is the best way.
BUT, if you want to use this unit after a time (using for example Wait XX seconds in your trigger), you must use triggering unit, as dying unit won't work.
Correct me if i'm wrong :)
 
  • Like
Reactions: sPy
Level 28
Joined
Jan 26, 2007
Messages
4,789
As far as I know:

Triggering unit is always better because dying unit refers to triggering unit.

So basically it's like opening the world editor and hit the F9 (test map)-button because you want to play warcraft, while just opening warcraft (without the editor) is easier and faster.
(And that would mean the first point of Exum was incorrect)
 
  • Like
Reactions: sPy
Level 3
Joined
Nov 19, 2010
Messages
51
Think of it like this:

Using triggering Unit makes sure that the unit TRIGGERING entering the region or matching the conditions will be the cause of the trigger actually starting. If you use Dying Unit I can imagine that if more than one target dies at the same time the trigger might be confusing the wrong unit from the right unit. Of course this could be countered with conditions I guess...

Main rule of thumb would probably be to go with Triggering unit most of the time.
 
  • Like
Reactions: sPy
Level 28
Joined
Jan 26, 2007
Messages
4,789
Think of it like this:

Using triggering Unit makes sure that the unit TRIGGERING entering the region or matching the conditions will be the cause of the trigger actually starting. If you use Dying Unit I can imagine that if more than one target dies at the same time the trigger might be confusing the wrong unit from the right unit. Of course this could be countered with conditions I guess...

Main rule of thumb would probably be to go with Triggering unit most of the time.
(Edited in readable color).

It isn't 'confusing' for the trigger when multiple units die, the thing is that "dying unit" refers to the unit which died last, overwriting the other value.
So if you use a wait, dying unit has pretty high chances of being overwritten by another unit which recently died.
Not confusing for the trigger and cannot be fixed with conditions.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
From what i can tell, the only time to not use triggering unit in these situations is when you are referring two triggering units in the same trigger.

Such as killing and dying unit.

Cause triggering unit would just be one of them, o_O

I think?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Everything that relates to Event that uses "Unit - ..." is referring to Triggering Unit
Ap0's post #2 explained everything
If you do other than Triggering Unit, (Dying/Selling/Killing) Unit, it's like you're taking a long way
A -> C (Triggering Unit)
A -> B -> C (Dying/Selling/Killing/etc)
It serves the same purpose but differs from EFFICIENCY
 
Level 6
Joined
Mar 29, 2004
Messages
109
the only time i use anything other than "triggering unit" is when i am not referring to the "triggering unit". for example say your trigger, for whatever reason activates when a certain type of unit kills a generic unit (if such an event exists). then the "killing unit" is the "triggering unit". if you want to do something with the victim of the "killing unit" then use "dying unit" otherwise use "triggering unit".

basically if you don't want to make the trigger effect the "triggering unit" use "killing unit", "dying unit" etc. i believe that is their intended purpose, otherwise their inclusion is madness.

IMO,
good luck.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
for example say your trigger, for whatever reason activates when a certain type of unit kills a generic unit (if such an event exists). then the "killing unit" is the "triggering unit". if you want to do something with the victim of the "killing unit" then use "dying unit" otherwise use "triggering unit".

There's no such event :)

There's basically no use for dying unit / attacked unit / casting unit / etc.
 
Level 3
Joined
Oct 5, 2010
Messages
26
ya, triggering unit definitely saves time and there will be less stuff for the game to do. On laggy machines/networks we simply do not want that extra step to slow the game
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Why would you want 3 forks when 1 fork does the job of all 3?

I don't understand the thoughts of the Higher Class. WTF is the point of a SALAD FORK? Just use the bloody fork for EVERYTHING. Mutter, mutter.....

What's the use of ENTERING UNIT, when it translates to TRIGGERING UNIT in much the same way as GUI translates into JASS?

Silly, Blizzard. Salads don't need their own forks!
 

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
If you make actions like move, attack or anything like it, then you will need units other than triggering unit.
Also, for event like Attacked unit, what would triggering unit be, Attacking or Attacked unit?
 
Status
Not open for further replies.
Top