• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 13
Joined
Nov 4, 2006
Messages
1,239
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