Non Melee Victory and Defeat

U

Unregistered

Guest
I have made a real good map with advanced triggers.... I am a computer programmer so I pretty much can figure out most of OOP. Im not trying to toot my own horn or anything I just don't want to sound stupid or look like I am an idiot when I ask this question because I am sure the answer is real simple and I just over looked it. Here it goes.....

My map is non melee and I can not figure out how to trigger defeat for the player with no more units or buildings and trigger victory for the other player. I was able to do this in starcraft easy but I can't figure it out in WC3. There are obvious triggers to use and I have tried them but when I kill all the opposing players nothing happens.

Thanks for all your input.
~BoBoLaTi
[email protected]
 

Darg

Administrator
Reaction score
49
event:
unit owned by player 1 dies (repeat for other players)

action

if (number of units owned by (owner of dying unit) matching (matching unit is alive equal to true) equal to 0) then do (game - play defeat for (owner of dying unit))
 

komapatient

New Member
Reaction score
10
event:
unit owned by player 1 dies (repeat for other players)

action

if (number of units owned by (owner of dying unit) matching (matching unit is alive equal to true) equal to 0) then do (game - play defeat for (owner of dying unit))

Well, how to count allied structures in? If you want to avoid a variable of all structures counted "every 0.15 seconds"?
 

unknown666

New Member
Reaction score
5
Trigger:
  • BJdefeat
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units owned by Player 1 (Red))) Equal to 0
            • Then - Actions
              • Game - Defeat Player 1 (Red) with the message: You are a loser!
            • Else - Actions
 

komapatient

New Member
Reaction score
10
Trigger:
  • BJdefeat
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units owned by Player 1 (Red))) Equal to 0
            • Then - Actions
              • Game - Defeat Player 1 (Red) with the message: You are a loser!
            • Else - Actions

This would run the trigger as a one shot.. after five seconds.. you surely meant it to be periodically didnt you?

EDIT: Wait, what did you mean with that trigger anyway???!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top