logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,668
Posts: 94,540

Administrators:
DeeZire, Redemption

There are currently 47 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 05-12-2004, 09:11 PM   #1 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Great Republic err State of Texas
Posts: 457
Default Coding Question on a Generals Power

I was coding the K-Wing Strike for Imperial assault and got everything done except that it won't execute the power. Here's my code.

SpecialPower.INI
Code:
SpecialPower SuperweaponK_WingStrike
  Enum                = SPECIAL_NAPALM_STRIKE
  ReloadTime          = 1000   ; in milliseconds
  RequiredScience     = SCIENCE_KWingStrike
  PublicTimer         = Yes
  SharedSyncedTimer   = Yes
  ViewObjectDuration  = 30000
  ViewObjectRange     = 250
  RadiusCursorRadius  = 100
  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
Science.INI
Code:
Science SCIENCE_KWingStrike
  PrerequisiteSciences = SCIENCE_CHINA SCIENCE_Rank1
  SciencePurchasePointCost = 1
  IsGrantable = Yes
  DisplayName = SCIENCE:ChinaNapalmStrike
  Description = CONTROLBAR:ToolTipChinaScienceNapalmStrike
END
ObjectCreationList.INI
Code:
ObjectCreationList SUPERWEAPON_KWingStrike
  DeliverPayload
    Transport                       = AmericaJetAurora
    FormationSize                   = 5
    FormationSpacing                = 35.0
    StartAtPreferredHeight          = Yes
    StartAtMaxSpeed                 = Yes
    MaxAttempts                     = 1
    DropOffset                      = X:0 Y:0 Z:-10
    DropDelay                       = 0
    Payload                         = AuroraBomb 1
    FireWeapon                      = Yes
    DeliveryDistance                = 300
    WeaponConvergenceFactor         = 1.0
    DeliveryDecalRadius = 100
    DeliveryDecal
      Texture           = SCCNapalmStrike_China
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:255 G:156 B:0 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
  End
End
CommandButton.INI
Code:
CommandButton Command_PurchaseScienceKWingStrike
  Command = PURCHASE_SCIENCE
  Science = SCIENCE_KWingStrike
  ButtonImage = SNFirestorm
  ButtonBorderType = UPGRADE
END

CommandButton Command_KWingStrike
  Command = SPECIAL_POWER
  SpecialPower = SuperweaponK_WingStrike
  Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science = SCIENCE_KWingStrike
  TextLabel = CONTROLBAR:NapalmStrike
  ButtonImage = SNFirestorm
  ButtonBorderType = ACTION
  DescriptLabel = CONTROLBAR:TooltipNapalmStrike
  RadiusCursorType = NAPALMSTRIKE
  InvalidCursorName = GenericInvalid
END

CommandButton Command_KWingStrike
  Command = SPECIAL_POWER_FROM_SHORTCUT
  SpecialPower = SuperweaponK_WingStrike
  Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science = SCIENCE_KWingStrike
  TextLabel = CONTROLBAR:NapalmStrike
  ButtonImage = SNFirestorm
  ButtonBorderType = ACTION
  DescriptLabel = CONTROLBAR:TooltipNapalmStrike
  RadiusCursorType = NAPALMSTRIKE
  InvalidCursorName = GenericInvalid
END
CommandSet.INI
Code:
CommandSet ChinaCommandCenterCommandSet
  1 = Command_ConstructChinaDozer
  2 = Early_Command_ChinaCarpetBomb
  3 = Command_NapalmStrike
  4 = Command_ClusterMines
  5 = Command_CashHack
  6 = Command_ArtilleryBarrage
  7 = Command_EmergencyRepair
  8 = Command_EMPPulse
  10 = Command_KWingStrike
  11 = Command_UpgradeChinaRadar
  12 = Command_UpgradeChinaMines
  13 = Command_SetRallyPoint
  14 = Command_Sell
End

CommandSet Command_KWingStrike
  1= Command_KWingStrike
End

CommandSet SCIENCE_CHINA_CommandSetRank3
  1 = Command_PurchaseScienceClusterMines
  2 = Command_PurchaseScienceKWingStrike
  3 = Early_Command_PurchaseScienceCarpetBomb
  4 = Command_PurchaseScienceArtilleryBarrage1
  5 = Command_PurchaseScienceArtilleryBarrage2
  6 = Command_PurchaseScienceArtilleryBarrage3
  7 = Command_PurchaseScienceCashHack1
  8 = Command_PurchaseScienceCashHack2
  9 = Command_PurchaseScienceCashHack3
  10 = Command_PurchaseScienceEmergencyRepair1
  11 = Command_PurchaseScienceEmergencyRepair2
  12 = Command_PurchaseScienceEmergencyRepair3
  13 = Command_PurchaseScienceFrenzy1
  14 = Command_PurchaseScienceFrenzy2
  15 = Command_PurchaseScienceFrenzy3
End
AmericaAir.INI
Code:
Object AmericaJetAurora
  SelectPortrait = SAAurora_L
  ButtonImage = SAAurora  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaCountermeasures
  Draw = W3DModelDraw ModuleTag_01
    DefaultConditionState
      Model = AVAurora
      HideSubObject = BurnerFX03 BurnerFX04
      WeaponLaunchBone = PRIMARY WeaponA
    End
    ConditionState = JETEXHAUST
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End
    ConditionState = JETEXHAUST JETAFTERBURNER
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
      ShowSubObject = BurnerFX03 BurnerFX04
      ParticleSysBone = Engine01 JetLenzflare
      ParticleSysBone = Engine02 JetLenzflare
    End
    ConditionState = REALLYDAMAGED
      Model = AVAurora_D
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
    End    
    ConditionState = REALLYDAMAGED JETEXHAUST
      Model = AVAurora_D
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End
    ConditionState = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model = AVAurora_D
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
      ShowSubObject = BurnerFX03 BurnerFX04
      ParticleSysBone = Engine01 JetLenzflare
      ParticleSysBone = Engine02 JetLenzflare
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End
    ConditionState = RUBBLE
      Model = AVAurora_D1
      HideSubObject = None 
      ShowSubObject = None
    End
    ConditionState = RUBBLE JETEXHAUST JETAFTERBURNER
      Model = AVAurora_D1
      HideSubObject = None 
      ShowSubObject = None
      ParticleSysBone = Engine01 JetExhaust
      ParticleSysBone = Engine02 JetExhaust
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End
    OkToChangeModelColor = Yes
  End
  DisplayName = OBJECT:Aurora
  EditorSorting = VEHICLE
  Side = America
  TransportSlotCount = 0
  VisionRange = 180.0 
  ShroudClearingRange = 600
  Prerequisites
    Object = AmericaAirfield
    Object = AmericaStrategyCenter
  End
  BuildCost = 2500
  BuildTime = 30.0
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AuroraBombWeapon
  End
  ArmorSet
    Conditions = None
    Armor = AirplaneArmor
    DamageFX = None
  End
  ArmorSet
    Conditions = PLAYER_UPGRADE
    Armor = CountermeasuresAirplaneArmor
    DamageFX = None
  End
  ExperienceValue = 200 200 400 400
  ExperienceRequired = 0 200 400 800
  IsTrainable = Yes
  CrusherLevel = 1
  CrushableLevel = 2
  CommandSet = AmericaJetAuroraCommandSet
  VoiceSelect = AuroraBomberVoiceSelect
  VoiceMove = AuroraBomberVoiceMove
  VoiceGuard = AuroraBomberVoiceSuperSonic
  VoiceAttack = AuroraBomberVoiceAttack
  VoiceDefect = AuroraBomberVoiceCreate
  SoundAmbient = AuroraBomberAmbientLoop
  SoundAmbientRubble = NoSound
  UnitSpecificSounds
    VoiceCreate = AuroraBomberVoiceCreate
    SoundEject = PilotSoundEject
    VoiceEject = PilotVoiceEject
    Afterburner = RaptorAfterburner
    VoiceLowFuel = AuroraBomberVoiceLowFuel
  End
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth = 80.0
    InitialHealth = 80.0
  End
  Behavior = JetSlowDeathBehavior ModuleTag_30
    FXOnGroundDeath = FX_JetOnGroundDeath
    OCLOnGroundDeath = OCL_AuroraDeathFinalBlowUp
    DestructionDelay = 99999999
    RollRate = 0.2
    RollRateDelta = 100%
    PitchRate = 0.0
    FallHowFast = 110.0%
    FXInitialDeath = FX_AuroraDeathInitial
    OCLInitialDeath = OCL_AuroraDeathHitGround
    DelaySecondaryFromInitialDeath = 500
    FXSecondary = FX_JetDeathSecondary
    FXHitGround = FX_JetDeathHitGround
    OCLHitGround = OCL_AuroraDeathHitGround
    DelayFinalBlowUpFromHitGround = 200
    FXFinalBlowUp = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp = OCL_AuroraDeathFinalBlowUp
    DeathLoopSound = Cin_MigFalling
  End
  Behavior = SpecialPowerCompletionDie ModuleTag_03
    SpecialPowerTemplate = SuperweaponK_WingStrike
  End
  Behavior = OCLSpecialPower ModuleTag_05
    SpecialPowerTemplate = SuperweaponK_WingStrike
    OCL = SUPERWEAPON_K_WingStrike
    CreateLocation = USE_OWNER_OBJECT
  End
  Behavior = DeliverPayloadAIUpdate ModuleTag_60
    DoorDelay = 0
  End
  Behavior = EjectPilotDie ModuleTag_40
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    ExemptStatus = HIJACKED
    VeterancyLevels = ALL -REGULAR
  End
  Behavior = PhysicsBehavior ModuleTag_15
    Mass = 500.0
  End
  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0
  End
  Behavior = JetAIUpdate ModuleTag_07
    OutOfAmmoDamagePerSecond = 10%
    TakeoffDistForMaxLift = 0%
    TakeoffPause = 500
    MinHeight = 5
    SneakyOffsetWhenAttacking = -20.0
    AttackLocomotorType = SET_SUPERSONIC
    AttackLocomotorPersistTime = 1100
    AttackersMissPersistTime = 3000
    ReturnForAmmoLocomotorType = SET_SLUGGISH
    ReturnToBaseIdleTime = 10000
  End
  Locomotor = SET_NORMAL AuroraJetLocomotor
  Locomotor = SET_SUPERSONIC AuroraJetSupersonicLocomotor
  Locomotor = SET_SLUGGISH AuroraJetSluggishLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor
  Behavior = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy = Upgrade_AmericaCountermeasures
  End
  Behavior = CountermeasuresBehavior ModuleTag_10
    TriggeredBy = Upgrade_AmericaCountermeasures
    FlareTemplateName = CountermeasureFlare
    FlareBoneBaseName = Flare
    VolleySize = 2
    VolleyArcAngle = 60.0
    VolleyVelocityFactor = 2.0
    DelayBetweenVolleys = 1000
    NumberOfVolleys = 3
    ReloadTime = 0
    EvasionRate = 25%
    ReactionLaunchLatency = 0
    MissileDecoyDelay = 200
  End
  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000
    AflameDamageAmount = 3
    AflameDamageDelay = 500
  End
  Behavior = TransitionDamageFX ModuleTag_22
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End
  Geometry = Box
  GeometryIsSmall = Yes
  GeometryMajorRadius = 14.0
  GeometryMinorRadius = 7.0
  GeometryHeight = 5.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89
End


Thats my code. I ran it through WB and it came up clean. The attack just won't execute.

And where would I find "SPECIAL_NAPALM_STRIKE"?

Thank you to all you coders who work so hard. This was the first time I realized that coding was so hard.
Juggernaut1985 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-12-2004, 10:24 PM   #2 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: Indiglo Plateau (USA)
Posts: 526
Send a message via ICQ to LtZack Send a message via MSN to LtZack
Default

for all Genrals powers..did you add a entry for it into that sides Command Center?
LtZack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-13-2004, 07:20 AM   #3 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

You're trying to drop a bomb with a DeliverPlayload-induced plane that not only can't contain bombs (no ContainBehavior) but also is player controllable. You need to take a look at the B52 bomber and especially the ContainBehavior and the DeliverPayloadAIUpdate. That last one is essential for it to work.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-13-2004, 06:05 PM   #4 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Great Republic err State of Texas
Posts: 457
Default

Immoman, I put in those 2 modules you told me to put in but it still gives me the "Invalid" cursor.

And what INI would i find this line in:

Enum = SPECIAL_NAPALM_STRIKE

Thank you very much.
Juggernaut1985 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 09:42 AM   #5 (permalink)
Junior Member
 
Join Date: May 2004
Posts: 2
Default

Uhm...take this with a grain of salt (I've never made a working superpower, out of 3 tries, two with tutorials. natch..) but isn't using the PublicTimer with a RequiredScience prohibited?
Rabid_Amoeba is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 11:44 AM   #6 (permalink)
Senior Member
 
Join Date: Jan 2003
Location: London
Posts: 178
Send a message via ICQ to Tesla-Chrono Send a message via AIM to Tesla-Chrono Send a message via MSN to Tesla-Chrono
Default

Its deployable from your ChinaCommandCenterCommandSet, but you have not added the code below to your ChinaCommandCenter in factionbuilding

Code:
  Behavior           = OCLSpecialPower ModuleTag_66
    SpecialPowerTemplate = SuperweaponK_WingStrike
    OCL                  = SUPERWEAPON_K_WingStrike
    CreateLocation       = CREATE_ABOVE_LOCATION
  End
Add the code above to your ChinaCommandCenter where there are similar entries and it should work.
Tesla-Chrono is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A question of AI coding... full_circle Generals & Zero Hour Editing 6 08-16-2006 08:18 PM
New TC:MOD for C&C generals, early stages pre-coding. & weed_eater Generals & Zero Hour Editing 8 04-06-2005 05:56 PM
Coding Question regarding Spawning Sauragnmon Generals & Zero Hour Editing 10 01-11-2005 06:26 PM
MLRS coding question... juLLe Generals & Zero Hour Editing 7 07-06-2004 01:40 PM
Coding question.. needleman Red Alert 2 & Yuri's Revenge Editing 1 12-28-2003 03:01 PM


All times are GMT -4. The time now is 03:46 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.