• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger help

Status
Not open for further replies.
Level 3
Joined
Oct 18, 2008
Messages
13
Hi everyone

I'm new in using the world editor of this game so I would like to know how to make so that : "When X, Y, Z and W are ALL dead, then do this action"

Because I tried to put "event : a unit dies" plus :
"conditions : and - all conditions are true" with each conditions relating to X, Y, Z and W separately.

Please, I will really appreciate that you answer me or tell me where I can find my answer (because I didn't found it in the Tutorial)
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Be careful, condition "Unit is dead" doesn't always work, use "Life lesser or equal to 0.01" instead.
  • Trigger
    • Events
      • Unit - X dies
      • Unit - Y dies
      • Unit - Z dies
      • Unit - W dies
    • Conditions
      • Life of (X) Lesser or equal to 0.01
      • Life of (Y) Lesser or equal to 0.01
      • Life of (Z) Lesser or equal to 0.01
      • Life of (W) Lesser or equal to 0.01
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Nono don't make it too hard!
By the way, you should use variables otherwise its impossible to detect.
This is a simple trigger that should work:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to X
      • (Dying unit) Equal to Y
      • (Dying unit) Equal to Z
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (X is dead) Equal to True
          • (Y is dead) Equal to True
          • (Z is dead) Equal to True
        • Then - Actions
        • -> Your actions
        • Else - Actions
          • Do nothing
Remember, first set all of your units to a variable.
 
Nono don't make it too hard!
By the way, you should use variables otherwise its impossible to detect.
This is a simple trigger that should work:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to X
      • (Dying unit) Equal to Y
      • (Dying unit) Equal to Z
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (X is dead) Equal to True
          • (Y is dead) Equal to True
          • (Z is dead) Equal to True
        • Then - Actions
        • -> Your actions
        • Else - Actions
          • Do nothing
Remember, first set all of your units to a variable.

How could the same unit be three units at the same time? =P
 
(Dying Unit) will make reference to only one unit in the trigger: the unit that dies. Each thread created by that trigger will have only one dying unit.

So, unless X = Y = Z, (Dying Unit) couldn't be the three at the same time.

Also, adding conditions that way will require ALL OF THEM to be true, so that the trigger is executed.
Using an 'or' will require only ONE of them to be true =P

I think the topic should die, now...
 
Status
Not open for further replies.
Top