Page 1 of 1

How to set unit limits [Solved]

Posted: Sun Nov 08, 2009 1:54 am
by TGB
hi i would like to put a limit to how many SBDs are on the maps in my realism mod. not the ai limit but the limit like with the special units it is 4. how would this be done?

Re: how to set unit limits

Posted: Sun Nov 08, 2009 2:44 am
by AQT
It's done by LUA. In your LUA look for the SetupTeams section. For example, this line

Code: Select all

            special = {"cis_inf_droideka",1, 4},
references the droideka unit. The first number you see (in this case 1) is the minimum amount of droidekas that can be out on the map while the second number (4) is the maximum amount. Change them accordingly as you see fit.

Re: how to set unit limits

Posted: Sun Nov 08, 2009 2:51 am
by TGB
thanks ill try it

Edit: that doesnt change the maximum count for it though, that changes the AI limits.
what i want ot change is for eg. with the jet trooper the maximum is 4 for both the AI and player, isnt there an odf setting that changes this?

Re: How to set unit limits

Posted: Sun Nov 08, 2009 3:33 am
by eliminator
you have to set in the odf:

Code: Select all

PointstoUnlock = [i]X[/i]
so you have a max of spawning ;-)

Re: How to set unit limits

Posted: Sun Nov 08, 2009 4:21 am
by AQT
^ That only changes the amount of points you need to earn in order to unlock a certain unit, nothing else.
that doesnt change the maximum count for it though, that changes the AI limits.
Right.
what i want ot change is for eg. with the jet trooper the maximum is 4 for both the AI and player
According to what you wrote here, "maximum count" and "AI limit" are the same thing. Please be more specific.

Re: How to set unit limits

Posted: Sun Nov 08, 2009 4:32 am
by destos
I Beleive he wants to edit the Max unit count of jet troopers on the field of battle at any given time.

which means you would want to edit this

Code: Select all

			special = { "rep_inf_ep3_jettrooper",1, 4},
4 is the number you want to edit, edit it to what ever number you want then munge, it should change the max number of units on the field of play.

Re: How to set unit limits

Posted: Sun Nov 08, 2009 5:20 am
by AQT
Yes, I've realized that which is why I used the droideka example in my first post.

Re: How to set unit limits

Posted: Sun Nov 08, 2009 10:14 am
by kinetosimpetus
Setting the lua to 1, 4 will enforce the limit on ai, but not players.
To enforce the limit on players also, the unit has to use PointsToUnlock as well.

Re: How to set unit limits

Posted: Sun Nov 08, 2009 3:24 pm
by eliminator
kinetosimpetus wrote:Setting the lua to 1, 4 will enforce the limit on ai, but not players.
To enforce the limit on players also, the unit has to use PointsToUnlock as well.
this is what i said :roll:

Re: How to set unit limits

Posted: Tue Nov 10, 2009 2:51 am
by TGB
it's working now, thanks