Posted By: Impaler
Random Names - 04/04/07 00:32
hi everyone,
I am making a first person shooter set in WWII in Normandie, and I want to be able to have a big library of names for soldiers, so that messages can come up like "You killed <name>" and that. The only problem is, I want to give random names to soldiers without having to script:
my.skill1 = int(random(100))
if(my.skill1 == 1)
{my.name = <something>;}
if(my.skill1 == 2)
{my.name = <something else>;}
and so on until 100. That would be really long and ugly code. is there an easier way to do this?
I am making a first person shooter set in WWII in Normandie, and I want to be able to have a big library of names for soldiers, so that messages can come up like "You killed <name>" and that. The only problem is, I want to give random names to soldiers without having to script:
my.skill1 = int(random(100))
if(my.skill1 == 1)
{my.name = <something>;}
if(my.skill1 == 2)
{my.name = <something else>;}
and so on until 100. That would be really long and ugly code. is there an easier way to do this?