| 03-05-2004, 05:02 AM | #1 |
why arent my conditions for victory working? Time - Every 6.00 seconds of game time Conditions (Number of units in (Units owned by Player 2 (Blue))) Equal to 0 (Number of units in (Units owned by Player 3 (Teal))) Equal to 0 (Number of units in (Units owned by Player 4 (Purple))) Equal to 0 (Number of units in (Units owned by Player 5 (Yellow))) Equal to 0 (Number of units in (Units owned by Player 6 (Orange))) Equal to 0 (Number of units in (Units owned by Player 7 (Green))) Equal to 0 (Number of units in (Units owned by Player 8 (Pink))) Equal to 0 Action Game - Display to Player Group - Player 1 (Red) for 7.00 seconds the text: You have won Game - Victory Player 1 (Red) (Show dialogs, Show scores) this is for player 1red , and i have this same structure repeated for all the other players i tested it out only with only red and blue, and i killed the blue unit, but no victory, why is it not working? |
| 03-05-2004, 06:58 AM | #2 |
In the 'Forces Settings', do you have the two check boxes checked in the top-right of it? |
| 03-05-2004, 01:47 PM | #3 |
Just a note...i'm sure that trigger could be made more efficient. I'd give you some ideas, but i'm not sure how your map works. for example, when a player has no more units left...can they still make units somehow? if they can't then you could just do a lose function. E: Player loses (you can decide on that) A: set numberOfLivingPlayers = (NumberOfLivingPlayers - 1) if NumberOfLivingPlayers = 1 then if [(math(count number of units for player 1)) >= 1] then player 1 wins if [(math(count number of units for player 2)) >= 1] then player 2 wins if [(math(count number of units for player 3)) >= 1] then player 3 wins et. start the variable NumberOfLivingPlayers as the number of players you have playing at the start of the game |
| 03-07-2004, 02:48 AM | #4 |
ok , i ran into problems again with conditions of victory, this is what i currently have Events Unit - A unit Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Set playersalive = (playersalive - 1) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions playersalive Equal to 1 Then - 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 1 Then - Actions Trigger - Run Winning p1 <gen> (ignoring conditions) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in (Units owned by Player 2 (Blue))) Equal to 1 Then - Actions Trigger - Run Winning p2 <gen> (ignoring conditions) Else - Actions (repeated for players up to 8) i think i caused some problems if i switch from first spot to another. like before the game, instead of staying player1red i move down to the 5th spot, i think this is were problems occured the problems are that mulitple players are "winning", because as soon as i kill the last unit, i get the victory message and a defeat message saying someone (sometimes its more than one) else won. im not sure thats the reason why caused this, but im not sure how to fix it anyway also, should each following action (for each player) be in the previous (else-actions)? does it have to do something with the forces? or is there just a problem with the trigger itself? EDIT: ok i think i have a better idea of the problem now, lets say in the beginning of the game, 5 players joined and are in spots 1-5 im 1st player red in first slot, and then i move down to spot 6 so now 2-6 are used. now in game, if i win, it will show victory for all the players before me meaning it will show victory for the players 2-6. if the 1st spot is used and that person wins, then the victory is fine, and noone else gets a victory by mistake so why is it like this? |
| 03-08-2004, 12:50 AM | #5 |
hm... after separating the triggers to Event: every 6 game seconds Condition: playersalive Equal to 1 (Number of units in (Units owned by Player 1 (Red))) Equal to 1 Then - Actions Trigger - Run Winning p1 i have that repeated for all 8 players, but it still will give the victory to whoever is before me this is what a tried, theres are 2 players, i am red and blue in spots 1 and 2 when i move down to spot 3 so its 2 and 3 slots used but noone in the first slot, if i win (kill blue) blue will get the victory sequence because he is before me(im in slot 3) why does it do this? |
