HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question about Voting system

01-12-2005, 02:22 AM#1
BattleBotv8.2
I'm trying to create a voting system and I'm running into a mental block. I have it so up to 4 players can vote, there are 3 options on the dialog. How do I detect it so that if 2 of the options are tied?
01-12-2005, 07:56 AM#2
Guest
Make an integrer variable for each option, and set it to +1 when someone votes for it. When everyone has voted, make a comparisson of the 3 options, selecting the one which variable is higher. If the votes are tied, you can randomly select one out of both, or, if the voting is for difficulty, you can select the easiest one of them.

Salutions®
01-12-2005, 02:29 PM#3
BattleBotv8.2
Does this work ok?

VoteNumber is a interger, if you hit option one it will set the VoteNumber[0] = VoteNumber[0] + 1. There are 3 options to choose from, the VoteNumber keeps tracks of how many has been clicked.
01-12-2005, 02:30 PM#4
BattleBotv8.2
Oops, forgot to attach the file.