Research?
Moderator: Moderators
Really, unlocking-through-buildings instead of research are so functionally similar that it's hardly worth mentioning. I mean, "click button" and "click button... place" are quite similar.
However, couldn't you hack it up some way - have a construction lab that builds an invisible, intangible unit which, on completion:
However, couldn't you hack it up some way - have a construction lab that builds an invisible, intangible unit which, on completion:
- Enables the construction of the other unit (or sets a global flag to enable the upgrade)
Disables the construction of itself.
Then dies silently, invisibly.
Can't COB scripts access global variables? There should be ways to disable those "certain weapons" and alter the attributes of the unit for the necessary upgrades based on the presence of a global variable in the COB script, i would think. It'd be a huge PITA, though.P3374H wrote:That doesn't help the problem of units requiring research to fire certain weapons, or unit upgrades however.
Then you unlock with buildings, if you lose the buildings you lose the tech, and you need more of that buildings to use the techon other places. With research not.Pxtl wrote:Really, unlocking-through-buildings instead of research are so functionally similar that it's hardly worth mentioning. I mean, "click button" and "click button... place" are quite similar.
However, couldn't you hack it up some way - have a construction lab that builds an invisible, intangible unit which, on completion:
- Enables the construction of the other unit (or sets a global flag to enable the upgrade)
Disables the construction of itself.
Then dies silently, invisibly.
Alas, the most obvious solution is a simple one that gets tagged to the sidedata file. A simple field for prerequisite. Basically the unit cannot get built until the prerequisite is met. The game engine simply would not begin construction, and just skip it on the build queue list, if the prerequisite was not present at the time it reached the top of the queue.
The bad thing is to get individual units to develop like that it gets overly long winded.
Code: Select all
[CANBUILD]
{
[ARMAAP]
{
prerequisite1=ARMAP;
prerequisite2=ARM_ADV_AIR_TECH;
canbuild1=ARMACA;
canbuild2=ARMBRAWL;
canbuild3=ARMPNIX;
canbuild4=ARMLANCE;
canbuild5=ARMHAWK;
canbuild6=ARMSEAP;
canbuild7=ARMAWAC;
canbuild8=ARMSEHAK;
canbuild9=ARMCSA;
}
[ARMHAWK]
{
prerequisite1=ARM_STEALTH_TECH;
}
}