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

Newbie help

Status
Not open for further replies.
Level 1
Joined
Oct 30, 2012
Messages
3
Well, so far I've been figuring out the trigger editor on my own with only the simplest things done :grin:

For example, When # unit dies, make unit # die

However I cannot being to guess how to do my next problem.

It should go like this: When unit #, #, and # (3 towers) die, make unit # vunerable. But ofc, it takes the first tower's destruction and makes said unit vunerable. It should be once all 3 towers are dead, the unit becomes vunerable.
 
Level 1
Joined
Oct 30, 2012
Messages
3
You should add the "And all conditions are true" condition and then enlist each dying tower condition there below "And all conditions are true'

EDIT: Sadly I don't have world editor at my disposal, so I can't post triggers. :/

I don't see anything like "all conditions are true" in the condition list
 
Level 18
Joined
May 11, 2012
Messages
2,103
Try this:

  • Make Invurnerable
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Your Building <gen>
          • (Triggering unit) Equal to Your Building <gen>
          • (Triggering unit) Equal to Your Building <gen>
    • Actions
      • Set Building_Integer = (Building_Integer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Building_Integer Equal to 3
        • Then - Actions
          • Unit - Make (Your Unit) Vurnerable
        • Else - Actions
 
Level 6
Joined
Sep 20, 2012
Messages
179
Your mistake is that you probably put these 3 conditions as 3 events, right? Trigger runs anytime, as soon as one of the events happens. So, as said above, you need conditions, not events.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You CANNOT use And conditions here, why ?
Because units in Warcraft can never die at the same time, therefore using And for this case will never fire the trigger.

Also, for Condition, it fires per event, therefore it would be unlikely for the game to have all 3 units die at once.

What you should do is register a counter for the deathCount, and once it has reach certain value, fire the action (just like The_blood did).
 
Level 6
Joined
Sep 20, 2012
Messages
179
The easiest way to do what you want is simply add 3 towers to some unit group and then check every 0.1 seconds if the group is empty. Then you don't have to use any special counter-variables.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
May90 it isnt easier then the_blood's method, your method requires periodic trigger as well as update trigger, because units are not removed naturally from unit group upon death while the_blood's method just requires one trigger and one global integer.
Also it would be good to turn off the trigger when the unit becomes vulnerable so it wont fire anymore
 
Level 6
Joined
Sep 20, 2012
Messages
179
because units are not removed naturally from unit group upon death

Hmm, I didn't know that. I just have never had any need in using such things. Thanks for the information.
Then, I agree, The_blood's method is better.
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
i think this is easier, condition being that the units must be premade
  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Matching unit) is dead) Equal to True
          • ((Matching unit) is dead) Equal to True
          • ((Matching unit) is dead) Equal to True
    • Actions
      • Unit - Make (Picked unit) Vulnerable
      • Trigger - Turn off (This trigger)
 
Level 1
Joined
Oct 30, 2012
Messages
3
i think this is easier, condition being that the units must be premade
  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Matching unit) is dead) Equal to True
          • ((Matching unit) is dead) Equal to True
          • ((Matching unit) is dead) Equal to True
    • Actions
      • Unit - Make (Picked unit) Vulnerable
      • Trigger - Turn off (This trigger)

Hello! I tried this method because it seemed less confusing, and it worked perfectly! Thanks for the help guys, it was great seeing so many chip in to offer advice :thumbs_up:
 
Status
Not open for further replies.
Top