I'd like to implement a feature that enables you to purchase units and upgrades at the tech buildings on the map (Oil derreck & Refinery) but I want the upgrades to be unique to each side. Is it possible to give each building a different commandset depending who has captured it? I think I may have read a thread about something like this a while ago but I can't find it.
Any help would be useful as this is the only thing tripping me up.
You could try giving each side an upgrade granted at the beginning and have those upgrades trigger different command sets. I'm not sure if it would work, though.
AFAIK you can only have one upgraded commandset, but I could be wrong. Although I'm not convinced that would work anyway; I don't think there is a trigger that is based on a building changing to a specific side.
In any case, another solution is to give the building a variety of buttons ( where some are greyed out depending on the faction ), or have buttons produce different effects depending on the faction.
If you give the units a side specific science for a prerequisite, the ones not for your side will be greyed out. That's the easy solution. I think there may be a more complex solution, but that is what I'd recommend.
That's it. AntiSocialKindaGuy & Mastermind you're both right. If I make 3 different buttons in the commandset for the same upgrade and each one requires a side specific Science, that'll do it. Now that I think about it, I don't need it to be specific to each general, just to each country. Thanks, I'll get on it straight away.
There is a better way. Just make it so every 0.5 seconds or so, a side specific OCL is created (like in the reinforcement pad to deploy the planes with tanks), which dies after 0.5 seconds (or whatever). This is then the prerequisite for building the new units etc.
There is a better way. Just make it so every 0.5 seconds or so, a side specific OCL is created (like in the reinforcement pad to deploy the planes with tanks), which dies after 0.5 seconds (or whatever). This is then the prerequisite for building the new units etc.
No offense but that's just plain confusing. No I think the Science prereq is the way to go. Thanks for the input though. Maybe I can use it for something else.
If you have buttons for sciences then your limited to the amount of buttons... no problem if your also limited to ideas, but if you have a ton of units you want built your gonna run outo of room fast. So look at the Internet Center's commandset upgrade coding... add grantupgrade create to each command center and work from there