ID:150226
 
Alright, I have my proc that rolls the stats, and that works just fine. Next I want a new proc to have the user choose where to place the stats.

I have that, and it prompts the user for their input, but... if there are more that one of the same number it only displays one, but you can choose it for the number of times it exists in the list.

Example:
-numbers: 14,14,9,8,12,12
-display: 14,9,8,12
-Choice- -what's left-
-choose 14: 14,9,8,12
-choose 14: 9,8,12
-choose 12: 9,8,12
-choose 9: 8,12
-choose 12: 8

I want it to display all the numbers, regardless of how many times the integer repeats itself.
Evilkevkev wrote:
Alright, I have my proc that rolls the stats, and that works just fine. Next I want a new proc to have the user choose where to place the stats.

I have that, and it prompts the user for their input, but... if there are more that one of the same number it only displays one, but you can choose it for the number of times it exists in the list.
[snip]
I want it to display all the numbers, regardless of how many times the integer repeats itself.

Well, you could try to bodge this by changing the list that goes into the input() proc, but heck, why go for a quick solution when you can do a long bug amazing graphical one?
Practically speaking, input() isn't very well suited to picking items from one list to put in another list; what you really want is something that will display both lists at the same time, making let you drag between them. To me, this suggests either a really creative stat panel system, or a graphical interface.

Picture for a moment: The player logs in to a staging area to pick out their character; eventually you'd want to fill this area with images, not actual objs or mobs, so multiple players could use it--but for now, use simple objs and mobs for the interface. Make an icon file that has images of dice displaying the numbers you rolled. Make another file to show the different stats, preferably in some kind of textual form so users can read it. Then you could add code to let you drag and drop, moving dice to the various stats until a desired combination is found.
Sounds like a pain, I know. Worth considering for a future project, I guess.

Anyway, here's another suggestion: Create a temporary stat panel showing all the dice you rolled, displaying an obj for each; the obj doesn't necessarily have to have an icon. When the user clicks on the die or the number, input() could then be used to let the user pick which stat to assign it to. There are other things you can do to make the interface even nicer, like if the user clicks on a number that's been assigned to a stat, it's "released" and can be assigned to something else; if a stat that's already assigned is picked for a different number, the new die could be assigned to it and the old one released automatically.

Just some options to consider.

Lummox JR
In response to Lummox JR
Well, you could try to bodge this by changing the list that goes into the input() proc, but heck, why go for a quick solution when you can do a long bug amazing graphical one?

How would I go about "bodging" is so it worked. (at least for now. I can get fancy once it's all done.)