I was wondering how you can actually implement the Terror Cell and give it to GLA. I tried some code similar to what I learned from the Carpet Bomb thread, but unlike carpetbomb, TerrorCell has no definitions in the FactionBuilding.ini.
As a result, I was able to get the Terror Cell to "appear" in the desired building of my choice, but once trying to activate, I get the infamous annoying "can't go there" cursor.
My self added code to try and define the Terror Cell inspired by the Ambush code:
Quote:
Object GLACommandCenter
AddModule
Behavior = OCLSpecialPower ModuleTag_88
SpecialPowerTemplate = SuperweaponTerrorCell
OCL = SUPERWEAPON_TerrorCell
CreateLocation = CREATE_AT_LOCATION
End
End
|
Nvrmnd, it works now...

With the help of the above given TerrorCell definition. It seemed that the thing screwing up, was nothing more than that I tried to add the button to an American Airfield for testing purposes (so I could easily test multiple new SWs), but I didn't define American Airfield as a valid holder of the TerrorCell...now it works though *soft cheer*
In case ppl need the entire code I have in my map.ini for this TerrorCell:
Quote:
;;;And trying out TerrorCell as well
Object GLACommandCenter
AddModule
Behavior = OCLSpecialPower ModuleTag_88
SpecialPowerTemplate = SuperweaponTerrorCell
OCL = SUPERWEAPON_TerrorCell
CreateLocation = CREATE_AT_LOCATION
End
End
End
SpecialPower SuperweaponTerrorCell
Enum = SPECIAL_TERROR_CELL
ReloadTime = 600000 ; in milliseconds
RequiredScience = SCIENCE_TerrorCell
PublicTimer = No
InitiateSound = TerrorCellActivated
End
CommandButton Command_TerrorCell
Command = SPECIAL_POWER
SpecialPower = SuperweaponTerrorCell
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:Ambush
ButtonImage = SUTerrorist
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipFireRebelAmbush
RadiusCursorType = AMBUSH
InvalidCursorName = GenericInvalid
End
ObjectCreationList SUPERWEAPON_TerrorCell
CreateObject
ObjectNames = GLAInfantryTerrorist
Count = 5
SpreadFormation = Yes
MinDistanceAFormation = 20.0
MinDistanceBFormation = 30.0
MaxDistanceFormation = 400.0
FadeIn = Yes
FadeTime = 3000
FadeSound = TerrorCellActivated
End
End
Science SCIENCE_TerrorCell
PrerequisiteSciences = None
SciencePurchasePointCost = 0 ; note that this means "not purchasable", NOT "free"!
IsGrantable = Yes
DisplayName = SCIENCE:TempName
Description = SCIENCE:TempDescription
End
;;;Used to give GLA the Terrorcell button
CommandSet GLACommandCenterCommandSet
1 = Command_ConstructGLAWorker
5 = Command_Ambush
6 = Command_EmergencyRepair
7 = Command_AnthraxBomb
8 = Command_TerrorCell
11 = Command_SetRallyPoint
12 = Command_Sell
End
|
Don't forget to grant the science via regular scripting though..
Now, if I only could get a decent button for the TerrorCell....