Defeated?

aydy

New Member
Reaction score
0
How Can i do so when a player lost all his units and building gets defeated? ( A message pop up and says for example "You're Defeated")
 
M

Made In WE

Guest
PHP:
Untitled Trigger 002
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (String((Number of units in (Units owned by Player 1 (Red))))) Equal to 0
            Then - Actions
                Game - Defeat Player 1 (Red) with the message: Defeat!
            Else - Actions
                Do nothing
 

aydy

New Member
Reaction score
0
PHP:
Untitled Trigger 002
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (String((Number of units in (Units owned by Player 1 (Red))))) Equal to 0
            Then - Actions
                Game - Defeat Player 1 (Red) with the message: Defeat!
            Else - Actions
                Do nothing

I Don't get it i cant find
Events
Unit - A unit Dies
Can't you do this trigger and upload to me?
 

Sim

Forum Administrator
Staff member
Reaction score
534
How Can i do so when a player lost all his units and building gets defeated? ( A message pop up and says for example "You're Defeated")

I think the normal WE function "Melee Game - Enforce Victory/Defeat conditions for all players" already takes care of that. Or is it for buildings only ?
Made_in_WE said:
Code:
Untitled Trigger 002
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (String((Number of units in (Units owned by Player 1 (Red))))) Equal to 0
            Then - Actions
                Game - Defeat Player 1 (Red) with the message: Defeat!
            Else - Actions
                Do nothing

Why String(x) ? It is not a string, it is THE number of units Equal to 0. Remove that "Integer to String" conversion.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top