| 12-15-2004, 01:57 PM | #1 |
Hi there :8 .. I am creating a multiplayer map where there is 4 teams. Every team have 3 players.. And then i also want that when one team reaches 25 lumber they win.... but i also want that all players in á team have the the smae amount of lumber.. ..this will make it easy to win the game, the only thing they need to do is to give all their lumber to one and the same player.. How to prevent that they can trade lumber between each other? :( SEND ME AN ANSWER! SOON!!! |
| 12-15-2004, 03:52 PM | #2 |
You could try setting the ally trading increment to 0(gameplay constants) but it will disable gold trading too. |
| 12-15-2004, 03:55 PM | #3 | |
Quote:
A team multiplayer map is nothing without gold trading... But in the worst case i can use this! Do you want me to give you a credit then if i use it? ![]() |
| 12-15-2004, 04:32 PM | #4 |
Hmmm disable trading the way he said, then implement a custom gold trading command. Like -Give 1 100 to give player 1 100 gold. |
| 12-15-2004, 05:06 PM | #5 | |
Quote:
But doesn't that need a HELL lot of trigger things?? :( I know triggers very well but i hate to store values and things that players sends as chat messages etc..... But i can always try... |
| 12-15-2004, 05:27 PM | #6 | |
Quote:
You can borrow triggers from ARK - Defens it's unprotected. |
| 12-19-2004, 02:38 PM | #7 |
Guest | There are two options: 1. Do what they say, make a custom gold trading function. OR 2. Instead of lumber, use an integer variable. The variable will be what needs to reach 25, not the lumber. The lumber can still be a way to display the number. Those are really the only ways I can think of. If you need help with either just ask me. |
| 12-19-2004, 03:01 PM | #8 |
[quote=C41N4M]Instead of lumber, use an integer variable. The variable will be what needs to reach 25, not the lumber. The lumber can still be a way to display the number.QUOTE] Well... I was thinking about it before.. But i don't really like custom variables.. But if i use i also cna fix that other players can see who is the leader... so i maybe should give it a try.. ![]() |
| 12-19-2004, 03:36 PM | #9 |
Actually i think there might be a way for you to only prevent lumber trade. [code] Every 1 second of game Action: If (Player X lumber = Player Y lumber) is false Then If (Player X lumber > Player Y Lumber) Then Set Player X Lumber =Player X Lumber - (Player X Lumber - Player Y lumber) Set Player Y Lumber = Player Y Lumber + (Player X Lumber - Player Y lumber) Else If (Player Y Lumber > Player X Lumber) Then Set Player Y Lumber = Player Y Lumber - (Player Y Lumber - Player X lumber) Set Player X Lumber = Player X lumber + (Player X Lumber - Player Y Lumber) Else do nothing Else: If (Player X Lumber = Player Z Lumber) = false Then If (Player X lumber > Player Z Lumber) Then Set Player X Lumber =Player X Lumber - (Player X Lumber - Player Y lumber) Set Player Z Lumber = Player Z Lumber + (Player X Lumber - Player Z lumber) Else If (Player Z Lumber > Player X Lumber) Then Set Player Z Lumber = Player Z Lumber - (Player Z Lumber - Player X lumber) Set Player X Lumber = Player X lumber + (Player X Lumber - Player Z Lumber) Else do nothing Else If (Put here your win commands like if Player X lumber >= 25, that team wins.) [code] Basically copy this four times and replace the X,Y,Z with player numbers. There is no need for actions of Y=Z cause of the transitive property; if X=Y, X=Z, then Y=Z. |
| 12-22-2004, 11:42 AM | #10 |
I know that Dota Allstars disabled the trading buttons, i dont know how but they did it! |
| 12-22-2004, 12:18 PM | #11 |
You really should get to know custom variables. They are very helpful. One integer variable only adds about 5 bytes to your map so it's not that big a deal. Just make an integer variable, set it initially to 0 and when your event happens that would normally increase the lumber you do this instead Code:
Set MyIntegerVariable = (MyIntegerVariable + 1) Then pick all players in triggering players team and set their lumber = MyIntegerVariable It's that easy! |
| 12-22-2004, 03:54 PM | #12 |
Why not only use a periodic event? Code:
Every 0.25 second of the game. Set player 1 lumber = player 1 lumber+player 2 lumber + player 3 lumber etc. Set player 2 lumber = 0. Set player 3 lumber = 0. Set player etc number = 0. Actually this is a nooby way to do. The best should be to use integer variable...and a little better would be to do: Code:
Every 0.25 second of the game: Set player 1 lumber = player 1 lumber+player 2 lumber + player 3 lumber etc. For each integer A from 2 to <AmountOfPlayers> Set player (integer A) lumber = 0. |
