• 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 - Fail quest when you lose your base

Level 4
Joined
Aug 8, 2019
Messages
37
What is the easiest trigger to make if I want my quest to fail if I lose my base? "Base" here means all buildings. Main thing I don't know how to do is check if player has buildings or not. I could do a unit group and check if they are dad or not, yaddi-yadda, but it seems lengthy and inneficient for such a straigth forward and common check. Is there a simpler way?

Thanks in advance
 
Level 30
Joined
Aug 29, 2012
Messages
1,383
You can use "Player - Count units" check, it's an integer

  • Defeat Units Dead
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • (Count structures controlled by Player 1 (Red) (Include incomplete structures)) Equal to 0
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
 
Level 2
Joined
Feb 8, 2025
Messages
10
Chaosium did it pretty much the shortest, easiest, cleanest way. Can't really go simpler than that.

Ofcourse, if you want other lose conditions you can do those aswell, but if its strictly buildings, thats the way to go.
 
Top