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

New Game Rules

Status
Not open for further replies.
Level 7
Joined
Jul 25, 2008
Messages
292
Okay, I want to change my game so instead of you loosing when all buildings are destroyed, you loose when all units (and buildings are destroyed)

How do I go about this, if I just remove the original settings it makes you not loose no matter what.
 
Delete that line.

Create a trigger like this:

  • Defeat Conditions
    • Events
      • Unit - A unit dies
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • (Number of units in (Units owned by (Triggering player))) Equal to 0
        • Then - Actions
          • Player - Defeat (Triggering player)
        • Else - Actions
 
Small mistake Bribe :D
>>Btw you were writing this by your own :p? I guess so, because Player - Defeat (Triggering player) doesn't exist, there is only Game - Defeat (Owner of (Triggering unit)) with the message: Defeat! :S

You pick all units, even dead ones what can cause that player who is suppose to lose will still play. We just need to use proper condition. It's also good to point that it doesn't force last remaining player to win the game.

@Hell_Raider: Remember to always remove Melee - Enforce victory/defeat conditions (for all players) action if you want to set your own conditions, since no matter what you do, if other players have no buildings, the one who has at least one wins.

Credits for orginall trigger to Bribe:
  • My victory conditions
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is alive) Equal to True))) Equal to 0
        • Then - Actions
          • Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!
          • Set tempforce = (All players matching (((Matching player) slot status) Equal to Play))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of players in tempforce) Equal to 1
            • Then - Actions
              • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
            • Else - Actions
          • Custom script: call DestroyForce (udg_tempforce)
        • Else - Actions
 
Status
Not open for further replies.
Top