Need a little help with names and random

MichaelK1985MichaelK1985 Member Posts: 36
edited December 2011 in Working with GS (Mac)
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 ;-)

Comments

  • CloudsClouds Member Posts: 1,599
    "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."

    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.
  • MichaelK1985MichaelK1985 Member Posts: 36
    Okay, adding 5 names in each team was not rocketscience. But how to assign the name to a numerical value is a different thing!
    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?
Sign In or Register to comment.