Victory condition not working

Justice

New Member
Reaction score
5
my map based on melee game but only player slots chooses hero and fights but players must be defeated when his ally (computers) buildings is destroyed (teams is not fixed with forces)

This trigger is for the Computer and works well


Code:
Untitled Trigger 001 Copy
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to Computer) and (((Matching player) slot status) Equal to Is playing))) and 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 (Picked player) matching ((((Matching unit) is A structure) Equal to True) and (((Matching unit) is alive) Equal to True)))) Equal to 0
                    Then - Actions
                        Game - Defeat (Picked player) with the message: Defeat!
                    Else - Actions


but for the players not works

here is the trigger
Code:
Untitled Trigger 001 Copy Copy
    Events
        Time - Every 5.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of players in (All allies of (Picked player))) Equal to 0
                    Then - Actions
                        Game - Defeat (Picked player) with the message: Defeat!
                    Else - Actions

where is the problem ?
 

Justice

New Member
Reaction score
5
not fixed :) same as the melee game. there are no forces. players chooses teams with teams selection
 

DrStyles

New Member
Reaction score
7
Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in (All allies of (Picked player))) Equal to 0
Then - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions

So it says if he has 0 allies then he gets defeated, but you still got allies even if they're dead I think. Maybe try something like: Pick all your allies, and if they have no buildings then defeat them.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
In the second trigger your condition checkes the number of PLAYERS not units
that is your fault
Just make the first trigger ....and change only the Computer to User.
 

Justice

New Member
Reaction score
5
But player slots don't have a buildings. user slots must be defeated when their allies (computers) don't have a buildings. Players choose their team at the map screen. There is no fixed teams. It is more like PG warcraft but altered some elements. So when in game I have to put players in "player group variables but i cannot find anyway to seperate allies and put them in different team variables.
 
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