Page 1 of 1
Replacing units in-game.
Posted: Thu Jul 09, 2015 1:08 am
by commanderawesome
Is there any way to replace a unit with a different unit in the lua?
Re: Replacing units in-game.
Posted: Sun Jul 12, 2015 11:52 pm
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?
Re: Replacing units in-game.
Posted: Mon Jul 13, 2015 11:46 am
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.
Re: Replacing units in-game.
Posted: Tue Jul 14, 2015 9:38 pm
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).