| 12-23-2003, 08:24 AM | #1 |
Ive messed with this trigger for my arena game for hours now, any help of fixing it or making a new one would be great: I got a variable named "player_count"set on 7 (amount of players max) and then in the beginning of the battle it checks like this: if player 1 spawn (a region) is empty, set "player_count" = "player_count" - 1 and then it goes like that through all 7 players. Now i have a variable who shows how many players are participating in the battle. This is the 2nd trigger for checking untill one wins: event: a unit dies actions: if then else: conditions: or (any conditions are true): if owner of dying unit = player 1 red and living units in "arena" (region) = 0 ---- then i go through all players with that script and replace player 1 with player 2 and so forth---- Actions: set "player_count" to "player_count" - 1 if then else (another one): conditions: player_count = 1 then actions: start next round Now i try this with a computer played with 3 units in blues spawn (center) and i use the picking system to pick 3 units to my own spawn. They are all totally inside their arena. But now when i kill all his units, nothing happens. The one who make me figure it out will get points and maybe even small credit in the end of the map!!!! :D edit: the fat text never happens (i tried with a text message insted), so i guess the bold text is the line who doesnt work/ |
| 12-23-2003, 08:46 AM | #2 |
instead of if owner of dying unit = player 1 red and living units in "arena" (region) = 0 try if owner of dying unit = player 1 red and living units in "arena" matching condition( matching unit owned by owner of (dying unit) ) = 0 There are other ways to do it, but that should fix your problem. Unless, of course, a dying unit isn't a dead unit when the trigger fires. In which case you need to add a very short wait somewhere in there... |
| 12-23-2003, 09:48 AM | #3 |
thx alot dude:D if that works ull deffinately get a few points... *greed* emote_sweat damn it doesnt work=( cud u be more exact and put the whole trigger, and PLZ try it in your own editor before post? You'll get credits if it works. Who knows, my map might become popular;) nobody on whole wc3campaigns know how to do this? omg.... :nono: |
| 12-23-2003, 06:21 PM | #4 |
I would suggest making it better (counting the number of units owned by allies of owner of dying unit, and making sure the unit being counted isn't summoned...), but this works. |
| 12-23-2003, 08:13 PM | #5 |
Yay! i just fixed it! Without your help though, but thx alot for helping=) the problem was that the "stupid" editor counted the start position as a unit. I just added "units matching condition (matching unit = ground unit)". :D |
