| 02-26-2004, 05:14 AM | #1 |
what condition should i have for lets say player 1 to win? my map is like a free for all of 8 players and last one standing in the winner right now im using this condition (Life of (Random unit from (Units owned by Player 2 (Blue)))) Less than or equal to 0.00 and i repeat that for all the players besides player 1 but thats doesnt work, is there a condition that is all units owned by player 2 (blue) instead of random unit of unit group?? is there a condition to select all units owned by a player? |
| 02-26-2004, 07:28 AM | #2 |
You can't use random unit that way. It only checks one random unit, not all units. You want.. integer comparation > count alive units owned by player > alive units owned by player2 = 0 (repeat for all players) The event should be "generic unit event > unit dies" |
| 02-26-2004, 06:50 PM | #3 |
ok thx, im going do that, didnt think of using integer condition i got another question how would i do this? Remove p1 Events Time - Every 15.00 seconds of game time Conditions (Player 1 (Red) slot status) Equal to Has left the game Actions Unit - Kill (Random unit from (Units owned by Player 1 (Red))) if red had a specific unit then i could just plug the unit in but the unit is random... what can i use so if player 1 has left the game (also unused) how can i kill (all units controlled by player 1) or something along those lines? |
| 02-26-2004, 07:05 PM | #4 |
set triggers when the heros are created... put a rect under where they pop out and make 12 triggers that say this... Events Unit enters rect (the rect you put under where they pop out :)) Conditions Entering Unit owned by player1 Actions set player1hero = entering unit Then make 12 more triggers Player1 leaves the game kill player1hero remove player1hero of course this is without using arrays. It would be much simpler using arrays, but I don't want to confuse you. :) Or if it's for a bunch of units, create a unit group variable per player and add all units entering your rect owned by player to that group, then just say pick every unit in player1unitgroup loop kill (picked unit) |
| 02-26-2004, 07:38 PM | #5 |
ok this is what i did playerleaving variable unit-array as soon as player1red unit is created (after the create unit action) Set playerleaving[1] = (Last created unit) when a player1red leaves or is unused Unit - Kill playerleaving[1] i repeated that for 8 players (player2blue is playerleaving[2] and so on) what i wanna know is what happens if there are only lets say 4 players playing from the getgo, the leaving/unused triggers for players 5-8 will try to kill a unit that doesnt exist or does that not matter at all? |
| 02-26-2004, 08:10 PM | #6 |
lol, if you kill a unit that doesn't exist, NOTHING HAPPENS. :) Also, if a player isn't playing, then the player can't leave, therefor not triggering the "player leaves" trigger, and no unit will be killed... so... |
