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

Victory condition not working

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,233
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


  • 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
  • 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 ?
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
That's getting complicated then...
How about using this the treat this player as an ally?
You can make checks about player forces(which will have been chosen before game) and then make the trigger witch makes the allies.
This would be hard and not a really solution to your problem...
But that's the only thing that i can come up with.
 
Level 18
Joined
Jun 2, 2009
Messages
1,233
That's getting complicated then...
How about using this the treat this player as an ally?
You can make checks about player forces(which will have been chosen before game) and then make the trigger witch makes the allies.
This would be hard and not a really solution to your problem...
But that's the only thing that i can come up with.

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.
 
Status
Not open for further replies.
Top