Random Trooper msh

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Random Trooper msh

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Random Trooper msh

Post 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.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Random Trooper msh

Post by myers73 »

im guessing that this would be done via lua not odf? and would you please post how to do it please.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Random Trooper msh

Post 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.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Random Trooper msh

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Random Trooper msh

Post by Fiodis »

For each unit?

Good luck.
Post Reply