• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Victory condition not working

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