• 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.

[Solved] wrong condition or event?

Status
Not open for further replies.
Level 9
Joined
Feb 20, 2014
Messages
409
Hi, this trigger is supposed to check if there is units owned by neutral hostile in region.
If not (they have been killed) it is supposed to respawn them after 60 sec.
But it doesn't work.
  • Event
    • Temps - Every 10.00 seconds of game time
  • Conditions
    • (Number of units in (Units in Castle1 <gen> matching ((Owner of (Matching unit)) Equal to Neutre Hostile))) Equal to 0
  • Actions
    • Trigger - Turn off (This trigger)
    • Wait 60.00 seconds
    • Unit - Create 6 Imperial Guard for Neutre Hostile at (Random point in Castle1 <gen>) facing 270.00 degrees
    • Unit - Create 1 Judicator for Neutre Hostile at (Random point in Castle1 <gen>) facing 270.00 degrees
    • Trigger - Turn on (This trigger)
 
Level 9
Joined
Jul 30, 2018
Messages
445
  • (Number of units in (Units in [Your region] matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
The (Matching unit) is alive is under the "Boolean Comparison". And it doesn't matter which one you put first and which one second.
 
Level 9
Joined
Feb 20, 2014
Messages
409
  • (Number of units in (Units in [Your region] matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and (((Matching unit) is alive) Equal to True))))
The (Matching unit) is alive is under the "Boolean Comparison". And it doesn't matter which one you put first and which one second.

  • ((Number of units in (Units in Castle1 <gen> matching ((Owner of (Matching unit)) Egal à Neutre Hostile))) Egal à 0) and (((Matching unit) is alive) Egal à FALSE)
Doesn't work ): What I am doing wrong?
 
Level 9
Joined
Jul 30, 2018
Messages
445
No you have to use the "And" in the Matching unit condition, not in the trigger's condition. Also, you have (Matching unit) is equal to False, when it should be True.

Sieppaa.PNG
 
Level 9
Joined
Feb 20, 2014
Messages
409
No you have to use the "And" in the Matching unit condition, not in the trigger's condition. Also, you have (Matching unit) is equal to False, when it should be True.

View attachment 320974

  • ((Number of units in (Units in Castle4 <gen> matching (((Owner of (Triggering unit)) Egal à Neutre Hostile) and (((Matching unit) is alive) Egal à TRUE)))) Egal à 0) and (((Matching unit) is alive) Egal à TRUE)
corrected.
If it's good it doesn't work ):
 
Level 9
Joined
Jul 30, 2018
Messages
445
Mmh.. And now you have to remove the last bit, because that will never return true, because there is no Matching unit for that condition. Also, you have Triggering unit on the first condition, when it should Matching unit

tempsnip.png
 
Level 9
Joined
Feb 20, 2014
Messages
409
Mmh.. And now you have to remove the last bit, because that will never return true, because there is no Matching unit for that condition. Also, you have Triggering unit on the first condition, when it should Matching unit

View attachment 320983

  • (Number of units in (Units in Castle4 <gen> matching ((Owner of (Matching unit)) Egal à Neutre Hostile))) Egal à 0
Can I make a test map and send it to you? Seriously it's impossible.
 
Level 9
Joined
Jul 30, 2018
Messages
445
I didn't work because buildings are units too, so there was always one unit, the Castle, in the region. I now added three conditions (Matching unit is not a structure) to the Matching unit conditions, and it works.
 

Attachments

  • testrespawn.w3m
    19.4 KB · Views: 26
Status
Not open for further replies.
Top