| 08-21-2004, 04:42 PM | #1 |
I'm making a map with an event which starts when the countdown timer expires..(not the problem) when it expires all on team one gets their cam panned and team 2 gets that two..(not the problem) it works fine but when all on one team is dead the other team gets 1000 gold but i dont know how to do it? |
| 08-21-2004, 05:10 PM | #2 |
Is there a player is defeated event? If so, just say that when one player dies, add 1 to a vaiable for the team that player belongs to. If that variable is equal to the total number of players on the team, add 1000 gold to all the other players. Sorry I can't be more specific, but I don't have the WE accesable at this time. |
| 08-21-2004, 05:20 PM | #3 |
which type of variable is it??? |
| 08-21-2004, 05:23 PM | #4 |
I would suggest integer, although real would work as well. |
| 08-21-2004, 05:33 PM | #5 |
do you think this would work This is where the "points" gets added to the variable Code:
E1 Light Lose Events Unit - A unit owned by Player 1 (Red) Dies Unit - A unit owned by Player 2 (Blue) Dies Unit - A unit owned by Player 3 (Teal) Dies Unit - A unit owned by Player 4 (Purple) Dies Unit - A unit owned by Player 5 (Yellow) Dies Conditions (Unit-type of (Dying unit)) Equal to Tauren Actions Set EVENT_1_WIN = (EVENT_1_WIN + 1) And here is the win condition Code:
E1 Dark WIn Events Time - Every 0.10 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions EVENT_1_WIN Equal to 5 Then - Actions Player - Add 1000 to Player 6 (Orange) Current gold Player - Add 1000 to Player 7 (Green) Current gold Player - Add 1000 to Player 8 (Pink) Current gold Player - Add 1000 to Player 9 (Gray) Current gold Player - Add 1000 to Player 10 (Light Blue) Current gold Else - Actions Do nothing |
| 08-21-2004, 05:37 PM | #6 |
If the Tauren dying means the player lost then it should. However, you can combine the triggers like this: Code:
E1 Light Lose
Events:
Unit - A unit owned by Player 1 (Red) Dies
Unit - A unit owned by Player 2 (Blue) Dies
Unit - A unit owned by Player 3 (Teal) Dies
Unit - A unit owned by Player 4 (Purple) Dies
Unit - A unit owned by Player 5 (Yellow) Dies
Conditions:
(Unit-type of (Dying unit)) Equal to Tauren
Actions:
Set EVENT_1_WIN = (EVENT_1_WIN + 1)
If\Then\Else
If:
EVENT_1_WIN is equal to 5
Then:
Player - Add 1000 to Player 6 (Orange) Current gold
Player - Add 1000 to Player 7 (Green) Current gold
Player - Add 1000 to Player 8 (Pink) Current gold
Player - Add 1000 to Player 9 (Gray) Current gold
Player - Add 1000 to Player 10 (Light Blue) Current gold
Else:
Do nothingThis way it'll get rid of the periodic event and should help reduce the lag that it would cause. Hope this helps! |
