Limit individual units ...
Moderator: Moderators
- AlvioWayne
- Recruit Womprat Killer
- Posts: 5
- Joined: Mon Jan 28, 2013 12:43 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Limit individual units ...
Welcome all!
I expose units (eg sniper) how many of them should be on the map (minimum and maximum).
sniper = {"rep_inf_ep3_sniper", 1, 2},
1 - minimum
2 - maximum snipers on the map
But acts only on the AI, but the player does not count!
Ie, if your card has two snipers, then I can be a third ...
I also need to get the choice of a unit indicates how much of the map and how many can be maximum, and if their have two, I can not select and play for him.
I've seen many mods that, but how to make them do not know.
I do not know where to look ...
Waiting for an answer ...
I expose units (eg sniper) how many of them should be on the map (minimum and maximum).
sniper = {"rep_inf_ep3_sniper", 1, 2},
1 - minimum
2 - maximum snipers on the map
But acts only on the AI, but the player does not count!
Ie, if your card has two snipers, then I can be a third ...
I also need to get the choice of a unit indicates how much of the map and how many can be maximum, and if their have two, I can not select and play for him.
I've seen many mods that, but how to make them do not know.
I do not know where to look ...
Waiting for an answer ...
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Limit individual units ...
If you add
to the unit .odf, it will enforce the maximum for human players as well.
Code: Select all
PointsToUnlock = 4 //or any number you want-
Loopy53
- 1st Lieutenant

- Posts: 456
- Joined: Thu Nov 01, 2012 2:27 am
- Projects :: Earth Apocalypse
- xbox live or psn: Dont have one
- Location: On earth, I guess.
Re: Limit individual units ...
what? I think you meant map?AlvioWayne wrote:Ie, if your card has two snipers, then I can be a third ...
- AlvioWayne
- Recruit Womprat Killer
- Posts: 5
- Joined: Mon Jan 28, 2013 12:43 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Limit individual units ...
PointsToUnlock = 4 what I need ...
But need unit was available immediately.
PointsToUnlock = 0, the result does not give, all the same that the functions do not.
But in the sum on map should be only one.
And play or should I or PC.
Simultaneously should not be!
But need unit was available immediately.
PointsToUnlock = 0, the result does not give, all the same that the functions do not.
Let's just say I have on map the two Jedi (one for playing AI, for the other I).what? I think you meant map?
But in the sum on map should be only one.
And play or should I or PC.
Simultaneously should not be!
-
Loopy53
- 1st Lieutenant

- Posts: 456
- Joined: Thu Nov 01, 2012 2:27 am
- Projects :: Earth Apocalypse
- xbox live or psn: Dont have one
- Location: On earth, I guess.
Re: Limit individual units ...
set the maximum 1 less maybe? lets say you have 4 ai + you but you only want 4 total so set the max ammount of AI to 3 then when you spawn there will be maximum of 4. I hope this makes sense/I am making sense of what you want.
- AlvioWayne
- Recruit Womprat Killer
- Posts: 5
- Joined: Mon Jan 28, 2013 12:43 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Limit individual units ...
On the map should be only one Jedi.
And if the Jedi is AI, I can not select it, and vice versa.
Parameter PointsToUnlock - almost what I need ...
Just with him a Jedi is not available immediately.
Or give the player at once one point ...
All units with the option PointsToUnlock opened initially.
And if the Jedi is AI, I can not select it, and vice versa.
Parameter PointsToUnlock - almost what I need ...
Just with him a Jedi is not available immediately.
Or give the player at once one point ...
All units with the option PointsToUnlock opened initially.
-
Loopy53
- 1st Lieutenant

- Posts: 456
- Joined: Thu Nov 01, 2012 2:27 am
- Projects :: Earth Apocalypse
- xbox live or psn: Dont have one
- Location: On earth, I guess.
Re: Limit individual units ...
We understand if English is not your first language, but I am having a hard time understanding you. Could you re-word that somehow? English in school was always hard for me.
How are droidekas, dark/jet troopers, and wookies limited in the number available? it says maximum 4, how is that done? I don't think its PTU (Points To Unlock).
How are droidekas, dark/jet troopers, and wookies limited in the number available? it says maximum 4, how is that done? I don't think its PTU (Points To Unlock).
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Limit individual units ...
The lua sets the minimum and maximum that specifies how AI choose what class to play.
For a sniper in a stock script, it's min = 1, max = 4, so AI will always try to have at least 1 sniper playing at once, and if there's already 4, will check other classes, but may still spawn as a sniper, and so can humans, beyond the 4 maximum.
However, with PointsToUnlock > 0 units, the maximum value changes from a guideline to a hard limit and a 5th sniper would be impossible. Also, AI would only spawn 3 so the player can spawn as one as well.
For a sniper in a stock script, it's min = 1, max = 4, so AI will always try to have at least 1 sniper playing at once, and if there's already 4, will check other classes, but may still spawn as a sniper, and so can humans, beyond the 4 maximum.
However, with PointsToUnlock > 0 units, the maximum value changes from a guideline to a hard limit and a 5th sniper would be impossible. Also, AI would only spawn 3 so the player can spawn as one as well.
-
Loopy53
- 1st Lieutenant

- Posts: 456
- Joined: Thu Nov 01, 2012 2:27 am
- Projects :: Earth Apocalypse
- xbox live or psn: Dont have one
- Location: On earth, I guess.
Re: Limit individual units ...
Seems to me like PTU is what you need then. Perhaps set it to a really low number? you could try a decimal. anyhow, best of luck.
- SAMofBIA
- Major General

- Posts: 649
- Joined: Tue Jun 15, 2010 3:38 pm
- Projects :: Nothing....nothing at all.
- xbox live or psn: No gamertag set
- Location: MIA and not stopping in often anymore.
Re: Limit individual units ...
decimal wouldn't work, the game can't give you a fractional value.
-
CressAlbane
- Master Bounty Hunter

- Posts: 1519
- Joined: Fri Dec 18, 2009 8:02 am
- Projects :: CTF Arenas
- Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Re: Limit individual units ...
I think setting PointsToUnlock to 1 and then giving the player 1 point when he spawns is a good idea.
-
Loopy53
- 1st Lieutenant

- Posts: 456
- Joined: Thu Nov 01, 2012 2:27 am
- Projects :: Earth Apocalypse
- xbox live or psn: Dont have one
- Location: On earth, I guess.
Re: Limit individual units ...
Yes, actually, that would (in theory) work! Now why didnt I think of that?
Give it a shot, AlvioWayne, and tell us if it works 
