Replacing units in-game.
Moderator: Moderators
- commanderawesome
- Field Commander

- Posts: 971
- Joined: Tue Aug 13, 2013 11:58 pm
- Projects :: Skin Changer - Warfront - Other stuff
- xbox live or psn: AaTc_CmdrAwesome
- Location: The Universe
Replacing units in-game.
Is there any way to replace a unit with a different unit in the lua?
- [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:
Re: Replacing units in-game.
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?
- commanderawesome
- Field Commander

- Posts: 971
- Joined: Tue Aug 13, 2013 11:58 pm
- Projects :: Skin Changer - Warfront - Other stuff
- xbox live or psn: AaTc_CmdrAwesome
- Location: The Universe
Re: Replacing units in-game.
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.
- [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:
Re: Replacing units in-game.
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).
