| 11-08-2003, 03:00 PM | #1 |
ok here r my two questions.... i am wokring on this aos style map, and i would like to konw how to do a trigger for gold split whenever player leaves. like the one trigger that is used in tob, when one of ur team mate leaves this trigger will disturibute the gold he had equaly to rest of the players. second question...this trigger is used in dota. when u or ur team mate kills a normal unit, rest of ur team mate players will recive certain amount of gold and when one of the team mate leaves, players will recive more gold from each unit kill that ur team mate does. it would be really nice if someone could help me on this. thx in advance |
| 11-08-2003, 03:18 PM | #2 | |
Quote:
hmm i have an idea ..... you need 2 variables for it, 1 for every team if its 5vs 5 set start value to 5 now, event a unit owned by player xxx dies condition --- action2 add xxx gold/(team1real) to player 1 add xxx gold/(team1real) to player 2 add xxx gold/(team1real) to player 3 add xxx gold/(team1real) to player 4 add xxx gold/(team1real) to player 5 now if a player leav the game or is not in use set the real -1 and all get a bit more gold :gsmile: isnt it worth a try? :D |
| 11-08-2003, 03:54 PM | #3 |
u shouldn't be using xxx for every unknown part :) that could give someone the idea that it is the same value :) which is definately not :) |
| 11-08-2003, 05:14 PM | #4 |
Actually in his case it is the same value. You might want to look again. As for your 1st question BorToKill To distribute gold like that is not too complicated. You detect how many team members are left on the team the player leaves from. Divde the leaving players gold by the number of teamates left. Add the result to the remaing teammebers gold. |
| 11-08-2003, 05:29 PM | #5 |
errr...so how could do that klownkiller...? i'm not really good with triggers... |
| 10-24-2004, 07:16 PM | #6 |
i just found out how, after browsing the triggers like crazy.. ill give an example for player 2 who leaves Player 2 Events Player - Player 2 (Blue) leaves the game Conditions Actions Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + has left the game. His/Her gold will be shared evenly among the team players.) Player Group - Pick every player in <need group variable here> and do (Player - Add ((Player 2 (Blue) Current gold) / (Number of players in (All allies of Player 2 (Blue)))) to (Picked player) Current gold) the variable of your group should be set like this: (Variable Name) (Type: Player Group (force)) (Initial Value: Empty Player Group (default) i hope this helps. |
