View Single Post
Old 12-23-2005, 11:56 PM   #8 (permalink)
DaLump
Senior Member
 
Join Date: Jun 2004
Location: United States of America
Posts: 122
Default

Here is my code for the EMP Artillery Platform

Weapon Object
Code:
;------------------------------------------------------------------------------
Object EMPlatformArtilleryShell
  
  Draw = W3DModelDraw ModuleTag_01
    ConditionState = NONE
      Model = AVTankShell
    End
  End
  
; ***DESIGN parameters ***
  DisplayName       = OBJECT:TankShell
  EditorSorting     = SYSTEM
  ArmorSet
    Armor = ProjectileArmor
  End
  ; *** ENGINEERING Parameters ***
  KindOf = PROJECTILE
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End
  Behavior = DestroyDie ModuleTag_03
    ;nothing
  End
    
  Behavior = DumbProjectileBehavior ModuleTag_04
 ; To tweak a Bezier path, please see GS
    FirstHeight = 50  ; Height of Bezier control points above highest intervening terrain
    SecondHeight = 150
    FirstPercentIndent = 30% ; Percentage of shot distance control points are placed
    SecondPercentIndent = 70%
    FlightPathAdjustDistPerSecond   = 0 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 0.01   ; we can't have a zero mass, but we want it pretty tiny...
  End

  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0

End
Weapon
Code:
;------------------------------------------------------------------------------
Weapon SupW_ArtilleryPlatformGun
  PrimaryDamage         = 50            
  PrimaryDamageRadius   = 30.0      
  ScatterRadius         = 15.0
  ScatterRadiusVsInfantry = 15.0     ;When this weapon is used ag
  AttackRange = 400.0 
  MinimumAttackRange = 150.0
  MinTargetPitch = 0                        ; we may not target anything outside of this pitch range
  MaxTargetPitch = 100                          ; ditto
  DamageType = EXPLOSION
  DeathType = EXPLODED
  WeaponSpeed = 300                           ; dist/sec 
  WeaponRecoil = 5                            ; angle to deflect the model when firing
  ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range                           ; dist/sec 
  ProjectileExhaust = PatriotMissileTrail
  ProjectileObject = EMPlatformArtilleryShell
  FireFX = WeaponFX_BattleshipBogusGun
  ProjectileDetonationOCL = SupW_OCL_ArtilleryEMPEffectSpheroid
  ProjectileDetonationFX = WeaponFX_EMPRocketDetonation
  FireSound = BattleshipWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 5000              ; time between shots, msec
  ShotsPerBarrel = 1                   ; By default, shoot one shot per barrel
  ClipSize = 0                    ; how many shots in a Clip (0 == infinite)
  
  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES WALLS
End
Pertinent Object Properties
Code:
  WeaponSet
    Conditions           = None 
    Weapon               = PRIMARY SupW_ArtilleryPlatformGun
    PreferredAgainst = PRIMARY VEHICLE
End


CommandSet        = SupW_AmericaArtilleryCommandSet
  ExperienceValue     = 200 200 200 200  ; Experience point value at each level

  ; *** AUDIO Parameters ***
  VoiceSelect = FireBaseSelect
  SoundOnDamaged        = BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
    UnderConstruction     = UnderConstructionLoop
  End

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    TurretMoveStart = NoSound
    TurretMoveLoop = EMPTurretmove ;These aren't playing properly, will revisit (mp) TurretMoveLoopLoud
  End
  
  ; *** ENGINEERING Parameters ***  
  RadarPriority   = STRUCTURE
  KindOf            = PRELOAD STRUCTURE SELECTABLE CAN_ATTACK IMMOBILE SPAWNS_ARE_THE_WEAPONS SCORE FS_TECHNOLOGY FS_BASE_DEFENSE IMMUNE_TO_CAPTURE GARRISONABLE_UNTIL_DESTROYED POWERED
  Body              = HiveStructureBody ModuleTag_04
    MaxHealth       = 1250.0
    InitialHealth   = 1250.0
  End
    
  Behavior = AIUpdateInterface ModuleTag_06
    Turret
      TurretTurnRate        = 130   // turn rate, in degrees per sec
      TurretPitchRate       = 130
      AllowsPitch           = Yes
      NaturalTurretPitch    = 45   
      GroundUnitPitch       = 20
      MinPhysicalPitch      = -20
      ControlledWeaponSlots = PRIMARY
      MinIdleScanInterval   = 550    ; in milliseconds
      MaxIdleScanInterval   = 950    ; in milliseconds
      MinIdleScanAngle      = 0       
      MaxIdleScanAngle      = 360     
    End
    AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
    MoodAttackCheckRate        = 250
  End

  Behavior = GarrisonContain ModuleTag_07
    ContainMax                    = 4
    EnterSound                    = GarrisonEnter
    ExitSound                     = GarrisonExit
    ImmuneToClearBuildingAttacks  = Yes
    DamagePercentToUnits          = 100%

    IsEnclosingContainer          = No

  End
DaLump is offline   Reply With Quote