[quote=Annihilationzh;150075]
You can then use ObjectCreationUpgrade to spawn the OCL. And if you don't want it to require an upgrade then you can give them the upgrade for free (see Dr Thrax's Command Center - he gets anthrax beta for free).[/quote]
I tried this to no avail today.
In Overlord's bunker (well the Gattling cannon since it has the bunker) I had:
[quote] Behavior = GrantUpgradeCreate ModuleTag_BunkerTroops
UpgradeToGrant = Upgrade_Tank_ChinaBunkerTroops
End
Behavior = ObjectCreationUpgrade ModuleTag_BunkerOCL
UpgradeObject = OCL_Tank_ChinaBunkerTroops
TriggeredBy = Upgrade_Tank_ChinaBunkerTroops
End[/quote]
In ObjectCreationList.ini I had:
[quote]ObjectCreationList OCL_Tank_ChinaBunkerTroops
CreateObject
ObjectNames = Tank_ChinaInfantryTankHunter
Count = 3
ContainInsideSourceObject = Yes
End
CreateObject
ObjectNames = Tank_ChinaInfantryRedguard
Count = 2
ContainInsideSourceObject = Yes
End
End[/quote]
In Upgrades.ini I had:
[quote]Upgrade Upgrade_Tank_ChinaBunkerTroops
DisplayName = UPGRADE:TankChinaBunkerTroops
Type = OBJECT
BuildTime = 15.0
BuildCost = 400
ButtonImage = SNHelixUp03
ResearchSound = HelixVoiceUpgradeBunker
UnitSpecificSound = OverlordExpansion
End[/quote]
What am I missing?
Also I added ECM behavior to the Overlord instead of one of its contained modules this time just to see if it's the correct code, works fine; only I got a "serious error" crash, the first I've had so far that was not caused by me alt-tabbing. Do you think it could be related to the ECM behavior?
EDIT actually my ECM behavior had a duplicate module tag, I'll fix it and post again if it comes up again.
EDIT2 those lines of pseudocode work when I put them in a bunker (the building). So I guess OverlordContain is the issue...?
Edited by user Tuesday, January 12, 2021 2:08:05 AM(UTC)
| Reason: Not specified