Random legions

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
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Random legions

Post by Labj »

I couldnt find this with search, i tried many forums and everyone said that the mod uses that but never found one that says how to do it...
Does anyone has a link or know about it ??
Thanks
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Random legions

Post by [RDH]Zerted »

Use Lua's random function. If it returns a certain number, setup a side a certain way. If it returns a different number, setup the side in a different way.
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: Random legions

Post by Labj »

[RDH]Zerted wrote:Use Lua's random function. If it returns a certain number, setup a side a certain way. If it returns a different number, setup the side in a different way.
:runaway: didnt get it...
Do you have a link to a more explained topic or be more specific, i never heard of that thing you said...
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Random legions

Post by mswf »

It's not something that has been gone through in a topic. But let me explain how you should set it up (you'd have to do the coding yourself)
In the part where you're legion would be chosen, ad in a random number (between 1 and the number of legions you want to have).
If the number is 1, you let the .lua load legion number 1.
If the number is 2, you let the .lua load legion number 2.
Then you'd have to ad the double or triple amount of units to your side folder.
Thats how I guess you'd let the code do what you wanted.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Random legions

Post by AceMastermind »

Post Reply