Spawning specific units depending on condition

Status
Not open for further replies.
Level 3
Joined
May 20, 2009
Messages
21
I'd simply like a specific unit to spawn depending on the starting race the player selected. So Protoss = Zealots. Zerg = Zerglings, Terran = Marines.
You'd start with your main build obviously
 
If you are talking about what units spawn right at the begining of the map near your main command building. You can actually set this in the Data Editor.

Find the RACES DATA section, and look for the field Starting Units+
In that, you can set what units and how many of each will spawn for that race at the start of a map.

You also MUST have the "Melee - Set Starting Units for All players" action in your map initialization trigger. (even if your map isnt a melee map.)
 
I think he means it in more of a footmen frenzy kind of spawning where its continuous rather than placed at start only. Either way both can be done via either trigger or data editor, depending on your preference.
 
Using triggers, you can look up the player attribute for their Race. You can then pass that through multiple selection (bunch of if statmenets) and then adjust the game acordingly.
If you are using a trigger based spawner, (I imagine you are), you simply use a variable for the spawn type and set that depending on the outcome of the multiple selection.

If you are using an data based spawn system (yes, it is possible to make a footman frenzy map with no custom triggering at all), you use a validator to check player race. You give the main building all spawners (for all races) but let the validators enable only the one for the player's race. The same can be applied to upgrade paths and everything.
 
Oh you answered me question, so do you know how to make the specfic unit a variable, I can go from there, i understand variables, but not sure how set or make one
 
To make a specific unit a variable, you need to create a global variable and set it to that unit. Global variables are created in the same white box as triggers and folders. If you wanted unit TYPE, its the same thing, but you set the type of unit.
 
Status
Not open for further replies.
Back
Top