- Joined
- Jun 27, 2010
- Messages
- 73
How do i do this: Ok i hve this Engineer unit and i want to add a ability to it that can put down mines then be able to detonate them when they want to causing damage to anyone in area. Plz help!

Use Triggering Unit instead of dying unit.
Could you please explain exactly why "Triggering unit" is better than "Dying unit"?
I always thought it's better not to use Triggering unit everywhere except such cases when there's no specific event-respond unit. Because "Triggering unit is too general and may not work properly sometimes. Maybe I'm just dumb, explain me where am I wrong?
Are you kidding me? (Triggering Unit) is in the bottom of that dialog, nearly the last string in it. So why do I have to use it?it is closer to the top of the drop-down dialog
Decrease your menu-scrolling time
Not only is (Triggering unit) <<faster>> than (Casting unit) or (Dying unit) in terms of execution time, it's actually faster to click because it is always the first option on the menu tree. Just use (Triggering unit) and, of course, set it to a variable if you use it more than 2-3 times.
Now that that's been mentioned, how about (Owner of (Triggering unit))? Ever notice that (Triggering player) is the first item on the menu-tree? That's because it's able to be used in more cases than you could imagine.
Every event which is selectable as "Any unit ---" is, in JASS, a "playerunitevent". This means that it has two triggering components, a unit, and a player.
Long story short, every "Any unit event" can use (Triggering player) instead of (Owner of (Triggering unit)) and get the same results.
This will cut down on your menu-scrolling time as well as game execution time, so it's faster in every sense of the word.
You can thank PurgeAndFire for showing me the (Triggering player) trick.