What if you made different units with every possibility covered.
So if a person with a pistol walked into region rifle their unit would be switched to unit with a rifle and a pistol.
So instead of adding something to the existing class it would switch you to a whole new unit with the proper weapons.
This method would probably include a 400 line long if-then or a huge switch statement (does stripped down BF2 LUA even have switch?)
But who cares it would be awesome if it worked!
How to add unit customization (in-game)
Moderator: Moderators
-
MasterSaitek009
- Black Sun Slicer
- Posts: 619
- Joined: Wed Aug 23, 2006 4:10 pm
-
Syth
- General

- Posts: 784
- Joined: Thu Apr 13, 2006 8:46 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: happy fun island
As I said this
You see, youd have 3-4 units that would be affected by weapon regions. In the LUA you set the limit of each of these units to 1 (so the AI dont use them). Then there would be room for 5-6 more units on your team, which would be normal units that the AI would use, uneffected by what weapon regions you go to.
would get around this...well my idea was that youd have 9 units-
3-4 units that would be customizable, and 6-5 would be pre-made units that would be primaraly AI.
I thought I heard that a script like this will cause all fellow units of your class to take on the weapon change
You see, youd have 3-4 units that would be affected by weapon regions. In the LUA you set the limit of each of these units to 1 (so the AI dont use them). Then there would be room for 5-6 more units on your team, which would be normal units that the AI would use, uneffected by what weapon regions you go to.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Your ideas would work Syth. You would use SetClassProperty() to change the values. Instead of regions (or in addition to), you could make droppable weapon packs like those health/ammo packs.
The game crashes when you add too many units to the two human playable teams. There is a single method which lets a unit be used by all teams, but I have never looked into what this does to the unit selection screen.
The game crashes when you add too many units to the two human playable teams. There is a single method which lets a unit be used by all teams, but I have never looked into what this does to the unit selection screen.
