• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] I can't find and use the "Unit - Cause Damage" trigger

Status
Not open for further replies.
Level 4
Joined
Jan 28, 2013
Messages
94
Hello,

I have seen several tutorials where the author uses a "Unit - Cause x Damage to Other Unit of Type y". It seems like a good trigger and I would like to use it in my map. However I can't find it! I uses the on-disc Editor for Frozen Throne and works with the in-built trigger editor. It's doing my head in that I can't find it. The only one I have found which is similar is the Issue Order trigger - "Issue Unit to Attack Unit". That one doesn't seem to work either as I noticed when I tried to use a Dummy Unit to damage a Unit which stepped into a trap. But now I am babbling.

What I wonder is where I can find the trigger in question (Unit Cause Damage to Unit of Type). Is it included in some user-made Editor, do I have to extract a trigger, have I missed that another trigger does the same thing or am I just blind?

I appreciate any answers I can get.

Edit: Btw I am running Warcraft III: Frozen Throne on Windows 7. Could that be why the trigger is missing? Also the game is installed on the second partition of my Hard Drive. (Not C:/)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you don't see this:
s9HHjdO.jpg

Then you should update your Warcraft I guess :/.
Just log in to battle.net and it automatically starts updating.
 
Level 4
Joined
Jan 28, 2013
Messages
94
Several of those are missing from my editor. Item order, inventory order, give item order, damage area/target, Increase/decrease/set level and add/remove classification. Obviously I got an older version of the Editor. It makes sense though, the old computer was used to play online which this one isn't. That's why I did use the action at one point. I don't got a Battle.net account though.

Thanks.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Unit - Cause x Damage to Other Unit of Type y[\QUOTE]
Edit/Btw what "other" means ?/
That looks like action to me...

And yes there is no such action too. You have to store all units of type into a unit group first and then damage each one of them in pick all units in unit group loop.
 
Level 4
Joined
Jan 28, 2013
Messages
94
I probably wrote it out in the wrong way. With Type I meant Damage Type e.g. spell, chaos, normal etc. As I said I haven't seen the actual Action in my Editor seeing as it's missing. the only actions which damage in my version is Unit - Set Health to Percentage/Value.

I guess that you could hurt more units by using a Pick Every Unit... action. But I don't know.

I wasn't asking for a Event, only a Action. My grasp about Events is mostly just Game Time and Enter region events, heh.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I don't got a Battle.net account though.
Warcraft III's battle.net isn't very strict. It takes about 1 minute to create an account on Warcraft III and log in.
Those accounts are purely visual: a name and a password, that's it. No e-mail, no annoying stuff.

Nowadays they delete your account automatically after 48 hours (unless you've logged in for over 2 hours, which I can't imagine) so it doesn't do any harm either.
And even if you stay logged in for longer than that, it will get deleted after 3 months if you never log in again.

So get an account, log in and start updating! :)
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
That would leak i think.
Use set UNITGROUP(unit group cariable)=the unist you want to damage
Then Pick all unist in unit group and do actions

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempUGroup = (Units in (Playable map area) matching ((Unit-type of (Maching unit)) Equal to Footman))
      • Unit Group - Pick every unit in TempUGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
Edit//Oh btw you can update your war3 without bnet acc too... just google warcraft 3 latest patch. But you'd need to download a few patches one by one... starting from you versions next version.
 
Level 4
Joined
Jan 28, 2013
Messages
94
Warcraft III's battle.net isn't very strict. It takes about 1 minute to create an account on Warcraft III and log in.
Those accounts are purely visual: a name and a password, that's it. No e-mail, no annoying stuff.

Nowadays they delete your account automatically after 48 hours (unless you've logged in for over 2 hours, which I can't imagine) so it doesn't do any harm either.
And even if you stay logged in for longer than that, it will get deleted after 3 months if you never log in again.

So get an account, log in and start updating! :)
Thanks for the help! I didn't even had to log into Battle.net, I just chose that option of the main menu and it automatically downloaded. :) I am not that good at multiplayer... I have played a few games back in the days and got killed quickly. Even Normal prove too much of a challenge for me.

Well I updated and now I got the missing actions! :)

That would leak i think.
Use set UNITGROUP(unit group cariable)=the unist you want to damage
Then Pick all unist in unit group and do actions

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempUGroup = (Units in (Playable map area) matching ((Unit-type of (Maching unit)) Equal to Footman))
      • Unit Group - Pick every unit in TempUGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
Edit//Oh btw you can update your war3 without bnet acc too... just google warcraft 3 latest patch. But you'd need to download a few patches one by one... starting from you versions next version.
Thanks for the trigger example. I'll keep it in mind. I understand what leaking means but I am not sure how it impacts performance. But probably in a bad way.
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempUGroup = (Units in (Playable map area) matching ((Unit-type of (Maching unit)) Equal to Footman))
      • Unit Group - Pick every unit in TempUGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
I just wanted to note that your trigger still leaks (as the group is never destroyed).
It's probably better to use set bj_wantDestroyGroup = true before a unit group pick, then you don't even need a variable.
Thanks for the help! I didn't even had to log into Battle.net, I just chose that option of the main menu and it automatically downloaded. :)

Well I updated and now I got the missing actions! :)


Thanks for the trigger example. I'll keep it in mind. I understand what leaking means but I am not sure how it impacts performance. But probably in a bad way.
Oh, cool :D.

And yeah, leaks are bad :/. Leaks cause your map to slow down over time. If your game is a bit longer, then it might even become unplayable.
Some older maps (WinterMaul Wars, for example) had that problem: after about 20-30 minutes, you only had 1 frame / second. Even longer in the game and you could only move once every 10 seconds.

It's not always that big of a deal, but just watch out when you're creating units/special effects (those are usually the most worst leaks because it happens a lot).
 
Level 4
Joined
Jan 28, 2013
Messages
94
I just wanted to note that your trigger still leaks (as the group is never destroyed).
It's probably better to use set bj_wantDestroyGroup = true before a unit group pick, then you don't even need a variable.

Oh, cool :D.

And yeah, leaks are bad :/. Leaks cause your map to slow down over time. If your game is a bit longer, then it might even become unplayable.
Some older maps (WinterMaul Wars, for example) had that problem: after about 20-30 minutes, you only had 1 frame / second. Even longer in the game and you could only move once every 10 seconds.

It's not always that big of a deal, but just watch out when you're creating units/special effects (those are usually the most worst leaks because it happens a lot).

That set bj_wantDestroyGroup = true is a Call Custom Script action right? Do I have to program the script itself in JASS? I don't handle that programming language. Isn't there some GUI action which also destroys a unit group/variable?

I had one of those leaks actually with a dummy unit. The trigger made it continue to spawn as I had a Unit Enter Region event. The map slowed down more and more and in the end it pretty much froze up on me! I should probably add the trigger into the other board. It's just copy n' paste and use the [ trigger ] tag right?

Anyway, thanks again. I am also grateful to whoever changed the prefix to Solved! I wasn't able to change it myself. :/

Edit: So far when I use Special effect I always use the Special Effect - Destroy (variable). But then again, it's mostly just quest markings... Sometimes a special effect.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
OOOOH yea sorry :) I forgot the call DestroyGroup(udg_TempUGroup) at the end :)

No you dont have to programm in jass. You can use custom scripts in GUI too.
Custom script is the third action from tha falling menu.
The trigger would look like this
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempUGroup = (Units in (Playable map area) matching ((Unit-type of (Maching unit)) Equal to Footman))
      • Unit Group - Pick every unit in TempUGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_TempUGroup)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
That set bj_wantDestroyGroup = true is a Call Custom Script action right? Do I have to program the script itself in JASS?

This will do the trick:
  • Custom script : set bj_wantDestroyGroup = true
I am also grateful to whoever changed the prefix to Solved! I wasn't able to change it myself. :/

Only moderators and administrators can change the prefix.
 
Level 4
Joined
Jan 28, 2013
Messages
94
OK, thanks for all the help. I appreciate it.

I could change the prefix when I made the thread but not when I edited it. Thanks for the answer though. :)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Just last ask:
"Unit - Cause Damage" trigger
trigger is lunching action, so its same as event in this context. Or I don't understand this word well?
You seem to misunderstand the meaning of events and actions.
An event is something that gets detected, like "Unit enters region": you detect that a unit enters a region.
"Unit - Cause Damage" doesn't have this detection: you don't detect that damage is dealt, you just deal it. In such cases, we speak of actions.
 
Status
Not open for further replies.
Top