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

Forum Info
Forum Members: 18,643
Total Threads: 8,744
Posts: 95,520

Administrators:
DeeZire, Redemption

There are currently 21 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » Spectre Gunship: Does anyone know how the code works for it?

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

Reply
 
LinkBack Thread Tools
Old 05-19-2004, 12:54 PM   #1 (permalink)
Junior Member
 
Join Date: May 2004
Posts: 2
Default Spectre Gunship: Does anyone know how the code works for it?

I was trying to figure out how the spectre gunship works, to see if I could make a higher level with two or three at a time circling, or make them autoaccquire targets. I can't figure out a thing. Apparently all the code for how the superweapon behaves is in AmericaAir.ini, tied directly to the Behavior, but I'm stumped as to how it works.

Here's the code. I highlighted what I think is the code dealing with how it acts.
Code:
;--------------------------------
Object AmericaJetSpectreGunship

  ; *** ART Parameters ***

  Draw = W3DOverlordAircraftDraw ModuleTag_01 ; Works with the dependencyModelDraw of the upgrade portable structures



    ;----NORMAL-------------
    DefaultConditionState
      Model           = AVSGunship
      WeaponFireFXBone    = PRIMARY MUZZLE
      WeaponFireFXBone    = SECONDARY MUZZLE
      WeaponMuzzleFlash   = PRIMARY MUZZLEFX
      WeaponMuzzleFlash   = SECONDARY MUZZLEFX
    End

    ConditionState    = DOOR_1_OPENING
      Model           = AVSGunship                 
      Animation       = AVSGunship.AVSGunship    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
    End

    ConditionState    = DOOR_1_CLOSING
      Model           = AVSGunship                 
      Animation       = AVSGunship.AVSGunship    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
    End


    ;----DAMAGED-------------
    ConditionState    = DOOR_1_OPENING DAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End

    ConditionState    = DOOR_1_CLOSING DAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
      ParticleSysBone = Smoke01 JetFireLarge
      ParticleSysBone = Smoke02 JetFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 JetSmokeLarge
    End


    ;----REALLY DAMAGED-------------
    ConditionState    = DOOR_1_OPENING REALLYDAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 SpectreContrail
      ParticleSysBone = WingTip02 SpectreContrail
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke02 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke04 SpectreSmokeLarge
    End

    ConditionState    = DOOR_1_CLOSING REALLYDAMAGED
      Model           = AVSGunship_D                 
      Animation       = AVSGunship_D.AVSGunship_D    
      AnimationMode   = ONCE_BACKWARDS
      Flags           = MAINTAIN_FRAME_ACROSS_STATES
      ParticleSysBone = WingTip01 JetContrailThin
      ParticleSysBone = WingTip02 JetContrailThin
      ParticleSysBone = Engine01 SpectreAfterburnerTrail
      ParticleSysBone = Engine02 SpectreAfterburnerTrail
      ParticleSysBone = Engine01 SpectreEngineFlare
      ParticleSysBone = Engine02 SpectreEngineFlare
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke02 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 JetSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke03 JetSmokeLarge
      ParticleSysBone = Smoke04 SpectreSmokeLarge
    End


    ConditionState = RUBBLE
      Model           = AVSGunship_D1
      ParticleSysBone = Smoke01 SpectreGunshipFireLarge
      ParticleSysBone = Smoke05 SpectreGunshipFireLarge
      ParticleSysBone = Smoke03 SpectreGunshipFireLarge
      ParticleSysBone = Smoke04 SpectreGunshipFireLarge
      ParticleSysBone = Smoke01 SpectreSmokeLarge
      ParticleSysBone = Smoke03 SpectreSmokeLarge
      ParticleSysBone = Smoke02 SpectreSmokeLarge
      ParticleSysBone = Smoke05 SpectreSmokeLarge
    End
    AliasConditionState = REALLYDAMAGED RUBBLE
    AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_CLOSING
    AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_OPENING
  


   OkToChangeModelColor = Yes

   ParticlesAttachedToAnimatedBones = Yes 


 End



  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:SpectreGunship
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 300.0 
  ShroudClearingRange = 300
  Prerequisites
    Object = AmericaAirfield
  End

  ArmorSet
    Conditions      = None
    Armor           = SpectreGunshipArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresSpectreGunshipArmor
    DamageFX              = None
  End


  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY   SpectreHowitzerGun
  End

  ExperienceValue = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = No             ;Not Player built, so no veterancy..............................

  ; *** AUDIO Parameters ***
  VoiceSelect         = SpectreGunshipVoiceSelect
  VoiceAttack         = SpectreGunshipVoiceAttack
  VoiceMove         = SpectreGunshipVoiceMove
  SoundAmbient = SpectreGunshipAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    Afterburner    = SpectreGunshipAfterburnerLoop
    HowitzerFire   = SpectreHowitzerWeapon
  End


  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_ATTACK VEHICLE AIRCRAFT SCORE SELECTABLE EMP_HARDENED

  Body = ActiveBody ModuleTag_03
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0
  End

  ExperienceValue     = 40 40 40 40  ; Experience point value at each level

  Behavior                          = JetSlowDeathBehavior ModuleTag_04
    DestructionDelay                = 99999999  ; destruction will happen when we
    RollRate                        = 0.0
    RollRateDelta                   = 100%      ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%    ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_SpectreGunshipExplosionLight
    OCLInitialDeath                 = None
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_spectreDeathExplosion
    OCLSecondary                    = None
    FXHitGround                     = FX_spectreGunshipDeathExplosion
    OCLHitGround                    = OCL_A10DeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
  ; FXFinalBlowUp                   = FX_spectreGunshipDeathExplosion
    OCLFinalBlowUp                  = OCL_SpectreDeathFinalBlowUp
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End
Here's the part that seems to control how the spectre acts.

Code:
  ;SCRIPTED SUPPORT: These special power is triggered directly 
  ;from the transport without creating a transport. This is done 
  ;via new code support and CreateLocation USE_OWNER_OBJECT -- 
  ;which also prevents creating the payload transport.

  Behavior = AIUpdateInterface ModuleTag_07
    ForbidPlayerCommands = Yes ; this AIUpdate will only do command if from script or AI, not player
  End
  Locomotor = SET_PANIC SpectreGunshipTransitLocomotor
  Locomotor = SET_NORMAL SpectreGunshipOrbitLocomotor

  Behavior = SpecialAbility ModuleTag_32 
    SpecialPowerTemplate = SuperweaponSpectreGunship
    UpdateModuleStartsAttack = Yes
  End


  Behavior = SpectreGunshipUpdate ModuleTag_10
    GattlingStrafeFXParticleSystem  = SpectreGattlingArmsSmoke
    SpecialPowerTemplate            = SuperweaponSpectreGunship
    HowitzerWeaponTemplate          = SpectreHowitzerGun
    GattlingTemplateName            = SpectreGunshipGattlingCannon 
    RandomOffsetForHowitzer = 20     
    TargetingReticleRadius  = 25
    OrbitInsertionSlope     = 0.7   ; steepness of orbit entry
    GunshipOrbitRadius      = 250
    HowitzerFiringRate      = 300   ; how long between each attempted shot of howitzer
    HowitzerFollowLag       = 400 ;600   ; how long after gattling acquires target can howitzer shoot same
    StrafingIncrement       = 20    ; how far apart is each shot of the gattling as it strafes
    AttackAreaRadius        = 200
    OrbitTime               = 15000 ;20000 ;32000 ; thirty-two seconds

    AttackAreaDecal
      Texture           = SCCSpecTarg
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 1500
      Color             = R:127 G:177 B:222 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    TargetingReticleDecal
      Texture           = SCCSpecRet
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 50%
      OpacityMax        = 100%
      OpacityThrobTime  = 300
      Color             = R:127 G:177 B:222 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
  End
This is the rest of the file

Code:


  Behavior = HelixContain ModuleTag_09
    Slots                     = 1
    DamagePercentToUnits      = 100%
    AllowInsideKindOf         = PORTABLE_STRUCTURE
    PassengersAllowedToFire   = Yes
    ShouldDrawPips            = No
  End


  Behavior = FlammableUpdate ModuleTag_08
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_11
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 4     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 90.0  ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
    VolleyVelocityFactor  = 2.0   ; Shoots out flares at a stronger velocity with a higher value.
    DelayBetweenVolleys   = 1000  ; Time between flare volleys
    NumberOfVolleys       = 5     ; Number of times the volleys will fire before reloading
    ReloadTime            = 0     ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
    EvasionRate           = 30%   ; With active flares, the specified percentage will be diverted.
    ReactionLaunchLatency = 0     ; Reaction between getting shot at and the firing of the first volley of countermeasures.
    MissileDecoyDelay     = 200   ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
  End

;;;;;;;;  ClientUpdate             = AnimatedParticleSysBoneClientUpdate ModuleTag_Client01
;;;;;;;;  End                  ; This allows the wingtip trails to stay stuck to the retractable wings
  

  Geometry = Box
  GeometryIsSmall = No
  GeometryMajorRadius = 40.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length

End
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, 01:54 PM   #2 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 191
Default

I think you have to use SpecialPower.ini to change the number of Spectres :|
Granger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 06:42 PM   #3 (permalink)
Junior Member
 
Join Date: May 2004
Posts: 11
Send a message via ICQ to Bloodredwolf
Default

try an OCL. like it's done with the A10s.
Bloodredwolf is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 07:04 PM   #4 (permalink)
Member
 
Join Date: Mar 2003
Location: Berlin, Germany
Posts: 69
Send a message via ICQ to Chriz
Default

There is no OCL entry where you can change it
Chriz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 07:10 PM   #5 (permalink)
Junior Member
 
Join Date: May 2004
Posts: 11
Send a message via ICQ to Bloodredwolf
Default

then why not make a new one. and refer to it in the unit.
Bloodredwolf is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 08:19 PM   #6 (permalink)
Member
 
Join Date: Mar 2003
Location: Berlin, Germany
Posts: 69
Send a message via ICQ to Chriz
Default

because it doesnt work for Spectre Gunships?

It dont work like A10s
Chriz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 08:25 PM   #7 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 872
Default

Maybe you could spawn another from the first and slave it.
Hostile is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-19-2004, 10:28 PM   #8 (permalink)
Member
 
Join Date: Sep 2003
Posts: 63
Default

Maybe you can use the overlord stuff to have the real one carry a fake one that fires....
Airstriker 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
Spectre attack cone and A-10s mrchris Generals & Zero Hour Editing 11 06-04-2006 11:06 AM
CH-47 Gunship Cattman2236 Generals & Zero Hour Editing 41 07-17-2005 05:38 PM
Spectre gunship animation schtoogie Generals & Zero Hour Editing 9 12-20-2004 02:21 PM
Laser Spectre DaLump Generals & Zero Hour Editing 4 07-29-2004 04:46 AM
Does anyone now how this works Daedalus Red Alert 2 & Yuri's Revenge Editing 5 03-30-2003 07:28 AM


All times are GMT -4. The time now is 07:49 AM.


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