Page 1 of 1

Random legions

Posted: Thu Aug 06, 2009 7:49 pm
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

Re: Random legions

Posted: Thu Aug 06, 2009 8:21 pm
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.

Re: Random legions

Posted: Fri Aug 07, 2009 12:01 am
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...

Re: Random legions

Posted: Fri Aug 07, 2009 12:59 am
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.

Re: Random legions

Posted: Fri Aug 07, 2009 2:47 am
by AceMastermind