Need a little help with names and random
Hi there,
For my game there is a possibility to add names to the game.
I have two teams, and in every team they can add 5 names.
Now I want the following things.
Random name selection. When you play a level, I want to pick a random name from that team. Is that possible?
Also when there are only 2 names enter in the game?
Let me know!
Thanks from a PRO GS user ;-)
For my game there is a possibility to add names to the game.
I have two teams, and in every team they can add 5 names.
Now I want the following things.
Random name selection. When you play a level, I want to pick a random name from that team. Is that possible?
Also when there are only 2 names enter in the game?
Let me know!
Thanks from a PRO GS user ;-)
Comments
I have two teams, and in every team they can add 5 names."
Yes, pretty easy.
"Random name selection"
Yes, no problem. Assign each name a numerical value within a given range - then select a random number within that range.
"Also when there are only 2 names enter in the game?"
Also no problem.
I can random select a number but that's between 1 and 5. What about there are only 2 names in 1 team. How can I random select a number?