Captain Joined: 12/17/2012(UTC) Posts: 57 Thanks: 10 times Was thanked: 7 time(s) in 4 post(s)
|
Ok could someone Check my coding over and make sure it works? Here is the Coding below for all the stuff I have changed.
(Copy of) the Spectregunship Coding
Object AmericaJetGunship
; *** 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:Gunship 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 Object = AmericaStrategyCenter End
ArmorSet Conditions = None Armor = SpectreGunshipArmor DamageFX = None End ArmorSet Conditions = PLAYER_UPGRADE Armor = CountermeasuresSpectreGunshipArmor DamageFX = None End
WeaponSet Conditions = None ; ----- Weapon = PRIMARY GunshipGattlingGun PreferredAgainst = PRIMARY INFANTRY VEHICLE AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI ; ----- Weapon = SECONDARY GunshipHowitzerGun PreferredAgainst = SECONDARY VEHICLE STRUCTURE AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI End
BuildCost = 2500 BuildTime = 45 MaxSimultaneousOfType = 1 CommandSet = Generic2CommandSet
ExperienceValue = 40 40 40 40 ;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 = 600.0 InitialHealth = 600.0 End
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
Behavior = JetAIUpdate ModuleTag_09 MinHeight = 5 NeedsRunway = No KeepsParkingSpaceWhenAirborne = No AutoAcquireEnemiesWhenIdle = Yes ; note that comanches do not return to base when idle ; this is a bit of a trick... normally, units cannot move-and-fire at ; the same time. we need the comanche to be able to. so we give it ; a "turret" (invisible) and put the two main weapons on it, but with ; no turn rate. voila! Turret TurretTurnRate = 0 ; this "turret" does not turn TurretPitchRate = 0 ; nor does it pitch ControlledWeaponSlots = PRIMARY SECONDARY End End
Locomotor = SET_NORMAL GunshipLocomotor Locomotor = SET_TAXIING BasicJetTaxiLocomotor
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
The Two Weapons Coding
GunshipGattlingGun
Weapon GunshipGattlingGun PrimaryDamage = 45.0 PrimaryDamageRadius = 0.0 ; 0 primary radius means "hits only intended victim" AttackRange = 2222.0 ; huge range DamageType = Gattling DeathType = NORMAL WeaponSpeed = 999999.0 ; dist/sec (huge value == effectively instant) AcceptableAimDelta = 180.0 ;;;; can fire facing any direction... allows gunship to shoot sideways ProjectileObject = NONE FireFX = WeaponFX_SpectreGattlingMuzzleFlash VeterancyFireFX = HEROIC WeaponFX_GattlingCannonMachineGunFireWithRedTracers FireSound = SpectreGunshipGattlingWeapon RadiusDamageAffects = ALLIES ENEMIES NEUTRALS DelayBetweenShots = 100 ; time between shots, msec ClipSize = 0 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 0 ; how long to reload a Clip, msec ContinuousFireOne = 1 ; How many shots at the same target constitute "Continuous Fire" ContinuousFireTwo = 2 ; How many shots at the same target constitute "Continuous Fire Two" ContinuousFireCoast = 2000 ; msec we can coast without firing before we lose Continuous Fire WeaponBonus = CONTINUOUS_FIRE_MEAN RATE_OF_FIRE 200% ; When the object achieves this state, this weapon gets double the rate of fire WeaponBonus = CONTINUOUS_FIRE_FAST RATE_OF_FIRE 300% ; This is not cumulative, so with Delay of 40, and values of 2 and 4 for these bonuses, you shoot at (40, 20, 10) ; WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; ChainGun upgrade AntiAirborneVehicle = No AntiAirborneInfantry = No AntiSmallMissile = No AntiBallisticMissile = No AntiGround = Yes End
GunshipHowitzerGun
Weapon GunshipHowitzerGun PrimaryDamage = 40.0 PrimaryDamageRadius = 25.0 ; 0 primary radius means "hits only intended victim" AttackRange = 2222.0 ; huge range DamageType = EXPLOSION DeathType = EXPLODED WeaponSpeed = 999.0 ; dist/sec (huge value == effectively instant) AcceptableAimDelta = 180.0 ;;;; can fire facing any direction... allows gunship to shoot sideways ProjectileObject = SpectreHowitzerShell FireFX = WeaponFX_GenericTankGunNoTracer VeterancyFireFX = HEROIC WeaponFX_GenericTankGunNoTracer ProjectileDetonationFX = FX_SpectreHowitzerExplosion FireSound = StrategyCenter_ArtilleryRound RadiusDamageAffects = ALLIES ENEMIES NEUTRALS DelayBetweenShots = 777 ; time between shots, msec ClipSize = 0 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 0 ; how long to reload a Clip, msec ContinuousFireOne = 1 ; How many shots at the same target constitute "Continuous Fire" ContinuousFireTwo = 2 ; How many shots at the same target constitute "Continuous Fire Two" ContinuousFireCoast = 2000 ; msec we can coast without firing before we lose Continuous Fire WeaponBonus = CONTINUOUS_FIRE_MEAN RATE_OF_FIRE 150% ; When the object achieves this state, this weapon gets double the rate of fire WeaponBonus = CONTINUOUS_FIRE_FAST RATE_OF_FIRE 200% ; This is not cumulative, so with Delay of 40, and values of 2 and 4 for these bonuses, you shoot at (40, 20, 10) ; WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; ChainGun upgrade AntiAirborneVehicle = No AntiAirborneInfantry = No AntiSmallMissile = No AntiBallisticMissile = No AntiGround = Yes ProjectileCollidesWith = STRUCTURES WALLS End
Command Button/Construction
CommandButton Command_ConstructAmericaGunship Command = UNIT_BUILD UnitSpecificSound = MoneyWithdraw Object = AmericaJetGunship ButtonImage = SASpGunship ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is End
CommandSet (Custom made for the Spectre Gunship)
CommandSet Generic2CommandSet 13 = Command_Guard 14 = Command_Stop End
CommandSet (For America Airfield)
CommandSet AmericaAirfieldCommandSet 1 = Command_ConstructAmericaJetRaptor 2 = Command_ConstructAmericaVehicleComanche 3 = Command_ConstructAmericaJetAurora 4 = Command_ConstructAmericaJetStealthFighter 5 = Command_ConstructAmericaA10Thunderbolt 6 = Command_ConstructAmericaGunship 7 = Command_UpgradeComancheRocketPods 8 = Command_UpgradeAmericaLaserMissiles 9 = Command_UpgradeAmericaCountermeasures 10 = Command_UpgradeAmericaBunkerBusters 13 = Command_SetRallyPoint 14 = Command_Sell End
Locomotor Gunship
Locomotor GunshipLocomotor Surfaces = AIR Speed = 100 ;55 ; in dist/sec SpeedDamaged = 100 ;40 ; in dist/sec MinSpeed = 80 ; in dist/sec TurnRate = 120 ; in degrees/sec TurnRateDamaged = 120 ; in degrees/sec MaxThrustAngle = 60 ; in degrees (NOT degrees/sec) Acceleration = 80 ; in dist/(sec^2) AccelerationDamaged = 50 ; in dist/(sec^2) Lift = 120 ; in dist/(sec^2) LiftDamaged = 80 ; in dist/(sec^2) Braking = 10 ; in dist/(sec^2) MinTurnSpeed = 100 ; in dist/sec PreferredHeight = 155 AllowAirborneMotiveForce = Yes ZAxisBehavior = SURFACE_RELATIVE_HEIGHT CirclingRadius = -375 ; the radius at which we circle when we are trying to maintain position. ; (pos = clockwise, neg = ccw, 0 = calc smallest possible radius given our speed, turning, etc) Appearance = WINGS
PitchInDirectionOfZVelFactor = 1.0 ; how much to pitch according to our z-vel. 0=none, 1=lots (0=default) PitchStiffness = 0.5 ; stiffness of the "springs" in the suspension forward & back. RollStiffness = 0.4 ; stiffness of the "springs" in the suspension side to side. PitchDamping = 0.7 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain. RollDamping = 0.6 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain. ForwardVelocityPitchFactor = 0 ; How much velocity will cause the front to lift/dip LateralVelocityRollFactor = 0.2 ; How much cornering will cause the chassis to roll. Apply2DFrictionWhenAirborne = Yes AirborneTargetingHeight = 30 LocomotorWorksWhenDead = Yes ; JetSlowDeathBehavior needs this to function correctly End
Edited by user Sunday, December 23, 2012 1:54:11 PM(UTC)
| Reason: Not specified
|