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

Victory Conditions

Status
Not open for further replies.
Level 11
Joined
Aug 16, 2007
Messages
847
I'm having som trouble getting my victory conditions to work,

I don't want the player to be defeated until he has no units left and not enough resources to build any more

In my map the cheapest things you can get are 8 gold or 8 lumber
There are also though 2 ivunerable units that you cant get to, but I want you to lose even if you have those...

Here's the trigger I made:

  • Victory Conditions
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Number of units in (Units owned by (Owner of (Triggering unit)))) Less than or equal to 2
      • ((Owner of (Triggering unit)) Current gold) Less than or equal to 7
      • ((Owner of (Triggering unit)) Current lumber) Less than or equal to 7
    • Actions
      • Game - Defeat (Owner of (Triggering unit)) with the message: |cffff0000You lack ...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) slot status) Equal to Has left the game
          • (Player 3 (Teal) slot status) Equal to Has left the game
        • Then - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Has left the game
          • (Player 3 (Teal) slot status) Equal to Has left the game
        • Then - Actions
          • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Has left the game
          • (Player 2 (Blue) slot status) Equal to Has left the game
        • Then - Actions
          • Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
        • Else - Actions
 
Level 11
Joined
Aug 16, 2007
Messages
847
well okay, but it doesn't defeat the player either. I don't know if the victory part works but the player isnt defeated even if he has 7 or less of each resource and 2 or less units

besides the only events like that correspond to specific players.
 
Last edited:
Level 14
Joined
Nov 4, 2006
Messages
1,241
you could check consumed food maybe? or you make a unitgroup for each player consiting of all units the player has/builds, and remove units from the group when they die, and then you check if number of units in this group is less or equal to 2
 
Status
Not open for further replies.
Top