HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Randoming heroes?

03-19-2006, 08:21 PM#1
Ignitedstar
A lot of AOS's use commands like -random to get a random hero, either becuase there's a benefit or because they're too lazy to pick their own. I was wondering how people actually did this. Someone mind telling?
03-19-2006, 08:27 PM#2
Captain Griffen
Because I can't choose between the heroes, or want something a little out of the blue.
03-19-2006, 08:32 PM#3
Tim.
He wants to know how to actually make the command I think..
03-19-2006, 08:33 PM#4
Ignitedstar
Yeah, Tim's got it right. I rarely random, but it takes me about 2 - 5 minutes to choose somebody. @_@
03-19-2006, 08:35 PM#5
paidan_fain
I guess you could do something like:
When a person types -random, use the math - random function to pick a random number and then use a series of ifs to decide which hero to train based on that random number.
03-19-2006, 08:36 PM#6
Captain Griffen
Fairly simple. Set all the heroes/hero types to an array, then select one with math - random int from 1 to X. Then proceed as normal for the map selection.
03-19-2006, 08:44 PM#7
GoblinPornstar
If your going to have "random hero" I prefer a big "?" that you click, instead of typing something like "-random".
03-19-2006, 08:47 PM#8
Ignitedstar
True, it's better then going through the long run, huh?

That's neat, but what if someone presses "?" when they mean that they're listening to someone or something? Or, what if they press that on accident? What if they got confused and put "?" ?
03-19-2006, 09:12 PM#9
GoblinPornstar
Then you just ad a sign thingy that pops up and says "are you sure you want to choose a random hero?" with the locigal choice of options "yes" or "no".