Page 1 of 1

Random Trooper msh

Posted: Wed Jun 17, 2009 12:02 am
by myers73
Just wondering if anyone has ever tried to have random trooper msh's. and if not, could people help me figure out how to do it. by this i mean, you could spawn as a rifleman, but might have a wookie or engi msh.

Re: Random Trooper msh

Posted: Wed Jun 17, 2009 11:29 am
by Fiodis
I can think of a sloppy workaround in which you are, upon spawning, instantly killed and respawned as a random class with the same weapons but a different mesh, thus simulating spawning with a random mesh.

Of course, this defeats the whole purpose of choosing a class in the first place.

Re: Random Trooper msh

Posted: Wed Jun 17, 2009 1:14 pm
by myers73
im guessing that this would be done via lua not odf? and would you please post how to do it please.

Re: Random Trooper msh

Posted: Wed Jun 17, 2009 5:07 pm
by Fiodis
It would be done; but as stated before it would be pointless. Basically:

OnCharacterSpawn
Check if the unit is human.
Kill him.
Get a random number between the number of unit classes.
Spawn him, and make sure his class is this random number.

There. You've just mitigated the point of choosing a class.

Re: Random Trooper msh

Posted: Wed Jun 17, 2009 5:29 pm
by Frisbeetarian
You misunderstand what he wants. He doesn't want a random class chosen between lives, he wants random meshes for each unit. Basically, the class would just stand for things like weapon set up, speed, etc. while what used these weapons would change between lives.

Re: Random Trooper msh

Posted: Wed Jun 17, 2009 5:31 pm
by Fiodis
For each unit?

Good luck.