Replacing units in-game.

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
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Replacing units in-game.

Post by commanderawesome »

Is there any way to replace a unit with a different unit in the lua?
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: Replacing units in-game.

Post by [RDH]Zerted »

Yes, depending on what you're doing. Are you making your own map, modifying someone else's without the source code, or modifying a map you have the code to? Should the change work online or just in single player?
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Replacing units in-game.

Post by commanderawesome »

At least in singleplayer, as I highly doubt what my team is making is MP-compatible anyway. In a nutshell, what i'm trying to accomplish is an in-game team select at the start of the level, allowing the player to choose the forces of their team and and their opponent. But to prevent the level from crashing at start, I needed placeholder units that I want removed once a teams are chosen.
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: Replacing units in-game.

Post by [RDH]Zerted »

You can't remove unit classes once you've added them. You're not using multiple placeholder units are you? You defiantly don't need multiple placeholders per team and I'm a bit surprised you need any placeholders (but I've never tested a map with no unit classes so I wouldn't actually know for sure).
Post Reply