Posted by: Gameanater - Saturday, October 17, 2015 9:19:18 PM
[code=plain]
ObjectCreationList.ini:
; -----------------------------------------------------------------------------
ObjectCreationList Demo_SUPERWEAPON_GLACarpetBomb
DeliverPayload
Transport = GLAJetCargoPlane
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:30 Y:40 Z:0
DropDelay = 150 ;500 ; time in between each item dropped (if more than one)
Payload = CarpetBomb 15
DeliveryDistance = 350
DeliveryDecalRadius = 180
DeliveryDecal
Texture = SCCCarpBomb
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
CommandButton.ini:
CommandButton Demo_Command_CarpetBomb
Command = SPECIAL_POWER
SpecialPower = SuperweaponCarpetBomb
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:CarpetBomb
ButtonImage = SSCarpetBomb
RadiusCursorType = CARPETBOMB
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipCarpetBomb
End
CommandButton Demo_Command_CarpetBombFromShortcut
Command = SPECIAL_POWER_FROM_SHORTCUT
SpecialPower = SuperweaponCarpetBomb
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = OBJECT:CarpetBomb
ButtonImage = SSCarpetBomb
RadiusCursorType = CARPETBOMB
InvalidCursorName = GenericInvalid
;ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:TooltipCarpetBomb
End
CommandButton Demo_Command_PurchaseScienceGLACarpetBomb
Command = PURCHASE_SCIENCE
Science = Demo_SCIENCE_GLACarpetBomb
ButtonImage = SSCarpetBomb
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
CommandSet.ini:
CommandSet Demo_SCIENCE_GLA_CommandSetRank1
1 = Command_PurchaseScienceScudLauncher
2 = Command_PurchaseScienceMarauderTank
3 = Command_PurchaseScienceTechnicalTraining
4 = Demo_Command_PurchaseScienceGLACarpetBomb
END
CommandSet Demo_SpecialPowerShortcutGLA
1 = Command_AmbushFromShortcut
2 = Command_EmergencyRepairFromShortcut
3 = Command_AnthraxBombFromShortcut
4 = Command_ScudStormFromShortcut
5 = Command_RadarVanScanFromShortcut
6 = Command_SneakAttackFromShortcut
7 = Command_GPSScramblerFromShortcut
8 = Demo_Command_CarpetBombFromShortcut
END
CommandSet Demo_GLAPalaceCommandSet
1 = Command_StructureExit
2 = Command_StructureExit
3 = Command_StructureExit
4 = Command_StructureExit
5 = Command_StructureExit
6 = Command_Evacuate
7 = Command_UpgradeGLAFortifiedStructure
8 = Command_UpgradeGLAArmTheMob
9 = Demo_Command_CarpetBomb
; 12 = Demo_Command_UpgradeGLADemoTrapHighExplosiveBomb*
13 = Demo_UpgradeSuicideBomb
14 = Command_Sell
End
*This line of code is already there in the unmodded files
SpecialPower.ini:
;-----------------------------------------------------------------------------
SpecialPower Demo_SuperweaponGLACarpetBomb
Enum = SPECIAL_CHINA_CARPET_BOMB ;SPECIAL_NAPALM_STRIKE*
ReloadTime = 150000 ; in milliseconds
RequiredScience = Demo_SCIENCE_GLACarpetBomb
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 40000
ViewObjectRange = 250
RadiusCursorRadius = 180
ShortcutPower = Yes ;Capable of being fired by the side-bar shortcut.
AcademyClassify = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End
*I've already tried using both of these. Still can't fire.
Palace in DemoGeneral.ini:
Behavior = OCLSpecialPower ModuleTag_24
SpecialPowerTemplate = Demo_SuperweaponGLACarpetBomb
OCL = Demo_SUPERWEAPON_GLACarpetBomb
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End
[/code]
Posted by: acidbrain - Sunday, October 18, 2015 1:28:58 AM
Did you add this module to the GLAJetCargoPlane?
[code=plain]
Behavior = OCLSpecialPower ModuleTag_11
SpecialPowerTemplate = Demo_SuperweaponGLACarpetBomb
OCL = Demo_SUPERWEAPON_GLACarpetBomb
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End
[/code]
Posted by: Annihilationzh - Sunday, October 18, 2015 12:30:48 PM
You have Demo_SuperweaponGLACarpetBomb in most of it but SuperweaponGLACarpetBomb in the buttons. They need to be the same.
Posted by: Gameanater - Sunday, October 18, 2015 2:37:38 PM
Alright, thank you both! I've done what AcidBrain and AZH said to do and now it works perfectly!
Well, except for one thing. The button at the Palace causes the game to crash with a "Serious Error" when I click it. Furthermore it doesn't match up with the timer of the power from the shortcut. [ATTACH]1786[/Attach] [ATTACH]1787[/Attach]
Posted by: Gameanater - Sunday, October 18, 2015 3:23:58 PM
Nevermind, I found the problem. I accidently put "Demo_SuperweaponGLACarpetBombb" instead of "Demo_SuperweaponGLACarpetBomb"
Thank you guys for your help!
On a side note, it's great to see that you're back, AZH. :D
Posted by: Annihilationzh - Sunday, October 18, 2015 7:45:22 PM
[quote=Gameanater;138759]Nevermind, I found the problem. I accidently put "Demo_SuperweaponGLACarpetBombb" instead of "Demo_SuperweaponGLACarpetBomb"[/quote]
Copy and Paste would solve so many of your problems.
As you can probably tell from CommieDog's tutorial, the cargo plane step isn't actually necessary.
[quote=Gameanater;138759]On a side note, it's great to see that you're back, AZH. :D[/quote]
Shh. It wasn't me that was missing. I swear it was the forum that was missing.
Posted by: Gameanater - Sunday, October 18, 2015 8:00:03 PM
[quote=Annihilationzh;138760][quote=Gameanater;138759]Nevermind, I found the problem. I accidently put "Demo_SuperweaponGLACarpetBombb" instead of "Demo_SuperweaponGLACarpetBomb"[/quote]
Copy and Paste would solve so many of your problems.
As you can probably tell from CommieDog's tutorial, the cargo plane step isn't actually necessary.
[quote=Gameanater;138759]On a side note, it's great to see that you're back, AZH. :D[/quote]
Shh. It wasn't me that was missing. I swear it was the forum that was missing.[/quote]
I used copy and paste. I just made an error in doing it.
Well, it worked, and I'm happy now. :D
-------------
XD
No I'm pretty sure you were missing.
-----------------
For anyone wondering looking at the code, no, this isn't going to be the same OP early-or-mid-game carpet bombing thing in my mod that Granger has in vanilla ZH. Yes, it drops more bombs, but the only reason it was available THAT early was just for testing purposes. It now requires the same level of General's Points as a Rebel Ambush.
Also, keep in mind that the GLA Cargo Plane is actually pretty fragile compared to the Granger B-52 Bomber, and a heckovalot slower.
Granger also will get his carpet bombing purchase button moved to the same level as a Ranger Drop for better balancing.