| 07-11-2003, 08:50 AM | #1 |
Ok Im making a map.. and im trying to make a cool vote system.. but i dont realy know how.. but here is what i wanna do.. i do the Hero Arena 4.0-6.0s.. the real ones.. and since everyone was ****ing up my ones below 6.0 i protected 6.0 with a pass but anyways here is what i wanna do.. i want to make a vote system where u put the players name in a vote.. and the guy with the most votes gets to duel.. like all players get 10 seconds to vote for a player by doing -(payer name) for you trigger experts how would i do so of making that trigger. all i need to know is how to acumulate votes so the person with the most by the end of the timer will be the rightfull dueler. |
| 07-11-2003, 12:30 PM | #2 |
use variables and when a person votes u add to the variable then at the end make it check for the variables and whichever is highest. |
| 07-11-2003, 12:34 PM | #3 |
could u give me an example? if u dont mind |
| 07-11-2003, 02:01 PM | #4 |
Sure, why not... First, let's make our variables. Vote[X] is an array. This is basicly all we need. Now, number one will represent when our vote is active and when it's not. Number 2 is for yes and number 3 is number of no:s. So... Turn on your voting any way you want, with events and maybe conditions (if someone, like the host, player 1, types -start vote or something, whatever, you choose that yourself), then set this in the trigger that turns the vote on: A: Set Vote[1] = 1 Turn on Trigger 1 Turn on Trigger 2 Turn on Trigger 3 Turn on Trigger 4 Display a message here that you can now vote for whatever by typing -vote yes or -vote no. Now, here's "Trigger 1": E: Player 1 types -vote yes as an exact match A: Turn off (this trigger) Set Vote[2] = Vote[2] + 1 Now, add Trigger 2, Trigger 3, ect until you have one for eatch player. Just change the event, the Set variable part stays as it is! You can also make a text message that is, as follows __________ String 1 + String 2 Player name of (triggering player) voted Yes! __________ Do the exact same thing for no. Possibly you could do yes and no in the same trigger but it's a tad bit more complicated so we wont do that. In your No triggers you set Vote[3] to +1. Now, whenever your vote is over (You can start a timer in the one that starts up the triggers or whatever), you count it like this: If Vote[2] equal to or greater then Vote[3] do Whatever! else do nothing If Vote[3] equal greater then Vote[2] do Whatever! else do nothing If/Then/Else 1 does something if the Yes side won, number 2 If/Then/Else statement does something is No side won. Set all your array variables to zero in your counting trigger as well. Regards Dead-Inside |
| 07-11-2003, 03:14 PM | #5 |
Thanx for that info... now i got some little questions because im not all that great with variables.. seems easy but complicated but.. ok that means i make 3 diffrent variables? 1,2,3 and when im making i check the array.. while im making it what variable type would it be? here is stuff i dont get.. First, let's make our variables. Vote[X] is an array. This is basicly all we need. Now, number one will represent when our vote is active and when it's not. Number 2 is for yes and number 3 is number of no:s. Turn on Trigger 1 Turn on Trigger 2 Turn on Trigger 3 Turn on Trigger 4 Display a message here that you can now vote for whatever by typing -vote yes or -vote no. oh yea.. and im trying t get the trigger to target players names instead of -vote yes/-vote no.. how would i get about doing that.. could u explain this a little more cause im not realy good with variables. |
| 07-11-2003, 11:38 PM | #6 |
bump? |
