Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline AdrianeMapMaker  
#1 Posted : Wednesday, May 10, 2017 5:45:22 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
Can you give some code

Something is Crashing my game (the crash info only say "game engine update" blah blah)

Any Help is appreciated
Code:

;------------------------------------------------------------------------------
Object JetA10Thunderbolt

  ; *** ART Parameters ***
  SelectPortrait         = SAWarthog_L
  ButtonImage            = SAWarthog

  Draw = W3DModelDraw ModuleTag_01

    OkToChangeModelColor = Yes

    ExtraPublicBone = WeaponA01
    ExtraPublicBone = WeaponA02
    ExtraPublicBone = WeaponA03
    ExtraPublicBone = WeaponA04
    ExtraPublicBone = WeaponA05
    ExtraPublicBone = WeaponA06

    DefaultConditionState
      Model             = AVWarthog
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
      ParticleSysBone = Engine01 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Wingtip01 JetContrailThin
      ParticleSysBone = Wingtip02 JetContrailThin
    End
	
    ConditionState      = REALLYDAMAGED
      Model             = AVWarthog_D
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
    End
    AliasConditionState  = RUBBLE

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:A10Thunderbolt
  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
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY A10ThunderboltVulcan
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End

  BuildCost               = 1400
  BuildTime               = 20   
  ExperienceValue = 50 100 150 400    ;Experience point value at each level
  ExperienceRequired = 0 150 450 900  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = JetA10ThunderBoltCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect            = RaptorVoiceSelect
  VoiceMove              = RaptorVoiceMove
  VoiceAttack            = RaptorVoiceAttack
  VoiceAttackAir         = RaptorVoiceAttackAir
  VoiceGuard             = RaptorVoiceAirPatrol
  SoundDie               = RaptorVoiceFalling
  SoundAmbient = A10ThunderboltAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    VoiceCreate        = RaptorVoiceCreate
    SoundEject         = PilotSoundEject
    VoiceEject         = PilotVoiceEject
	Afterburner        = RaptorAfterburner
    VoiceLowFuel       = RaptorVoiceLowFuel
    VoiceGarrison      = RaptorVoiceMove
    StartDive          = A10ThunderboltDive
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 600.0
    InitialHealth   = 600.0
  End

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

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    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_JetDeathInitial
    OCLInitialDeath                 = None
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = None
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_A10DeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_A10DeathFinalBlowUp
  End
  Behavior                    = EjectPilotDie ModuleTag_06
    ExemptStatus         = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  ;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    = OCLSpecialPower ModuleTag_06
    SpecialPowerTemplate = SuperweaponA10ThunderboltMissileStrike ;@@KRIS@@
    OCL                  = SUPERWEAPON_A10ThunderboltMissileStrike1
    CreateLocation       = USE_OWNER_OBJECT
  End

  Behavior = DeliverPayloadAIUpdate ModuleTag_07
  End
  Locomotor = SET_NORMAL JetA10ThunderboltLocomotor
  
  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffSpeedForMaxLift    = 100%   ; smaller numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
  End

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

  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_22
  End

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

End

;-----------------------------------
Locomotor JetA10ThunderboltLocomotor
  Surfaces            = AIR
  Speed               = 120 ;55              ; in dist/sec
  SpeedDamaged        = 120 ;40         ; in dist/sec
  MinSpeed            = 60             ; in dist/sec
  TurnRate            = 120            ; in degrees/sec
  TurnRateDamaged     = 90      ; in 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        = 150          ; in dist/sec
  PreferredHeight     = 100
  AllowAirborneMotiveForce = Yes
  ZAxisBehavior       = SURFACE_RELATIVE_HEIGHT
  CirclingRadius      = 100 ; 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.9                    ;  How fast it damps.  0=perfect spring, bounces forever.  1=glued to terrain.
  RollDamping = 0.8                     ;  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
;--------------------------------------
CommandSet JetA10ThunderBoltCommandSet
  1 = Command_A10ThunderboltMissileStrike
  9  = Command_AttackMove
  10 = Command_GuardFlyingUnitsOnly
  11 = Command_Guard
  12 = Command_Stop
End

CommandButton Command_ConstructAmericaA10ThunderBolt
  Command       = UNIT_BUILD
  Object        = JetA10Thunderbolt
  TextLabel     = CONTROLBAR:ConstructAmericaJetRaptor
  ButtonImage   = SAWarthog
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildRaptor
End

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Sponsor
Offline acidbrain  
#2 Posted : Wednesday, May 10, 2017 6:10:15 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
You have 2 AIUpdate modules, remove the DeliverPayloadAIUpdate and try again...
You also have to create a new weapon for the plane, you cant use the a10 like the special weapon attack does if you make it buildable...
Check other airplanes for the code, plenty of examples of how to code it properly...
Check This stuff...

Greetz

Edited by user Wednesday, May 10, 2017 6:26:21 AM(UTC)  | Reason: Secret

Panem et kirkinses
thanks 1 user thanked acidbrain for this useful post.
elliesy on 5/10/2017(UTC)
Offline mr_hymn_  
#3 Posted : Wednesday, May 10, 2017 10:17:44 PM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
I have a way to build it and make it dive. Otherwise it will be just like any other aircraft.

What you need is to make it like aurora bomber when attack it will dive and release all the weapons. However you need to make the vulcan gun have limited ammo and need to return to base to refill otherwise after your a10 launch all the missiles he will not return to base but rather circling around and keep attacking the target with his vulcan.

The attack locomotor is dive. set to low height about 40-50 or so. recommend to use HOVER type otherwise he won't dive at all.

The drawback of this trick is it will dive from the airfield to a target which not looking cool if you manually order to attack but if you choose to guard or attack on the move he will dive only when he is getting closed to a target which it is awesome!
Offline mr_hymn_  
#4 Posted : Wednesday, May 10, 2017 11:11:35 PM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
Here is my code
A10 code, it fired missiles correctly and doing stuff correctly.

Code:

;------------------------------------------------------------------------------
Object AmericaJetA10ThunderboltTest

  ; *** ART Parameters ***
  SelectPortrait         = SAWarthog_L
  ButtonImage            = SAWarthog
  
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaCountermeasures
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE

  Draw                   = W3DModelDraw ModuleTag_01
    
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model             = AVWarthog
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
      WeaponFireFXBone  = SECONDARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
      WeaponMuzzleFlash = SECONDARY WeaponA
      ShowSubObject = Weapon01 Weapon02 Weapon03 Weapon04 Weapon05 Weapon06
      ParticleSysBone = Engine01 JetBlackTrailThin
      ParticleSysBone = Engine02 JetBlackTrailThin
      ParticleSysBone = Wingtip01 JetContrailThin
      ParticleSysBone = Wingtip02 JetContrailThin
    End

    ConditionState      = REALLYDAMAGED
      Model             = AVWarthog_D
      WeaponMuzzleFlash = PRIMARY MuzzleFX01
      WeaponFireFXBone  = PRIMARY Muzzle01
      WeaponFireFXBone  = SECONDARY WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
      WeaponMuzzleFlash = SECONDARY WeaponA
      ShowSubObject = Weapon01 Weapon02 Weapon03 Weapon04 Weapon05 Weapon06
    End
    AliasConditionState  = RUBBLE

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:A10Thunderbolt
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 180.0 
  ShroudClearingRange = 600
  
  BuildCost           = 0
  BuildTime           = 0.5          ;in seconds     
  WeaponSet
    Weapon = PRIMARY A10ThunderboltVulcanTest
    Weapon = SECONDARY A10ThunderboltMissileWeaponTest
  End
  ArmorSet
    Conditions      = None
    Armor           = AirplaneArmor
    DamageFX        = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = CountermeasuresAirplaneArmor
    DamageFX              = None
  End

  ExperienceValue = 200 200 400 400   ;Experience point value at each level
  ExperienceRequired = 0 200 400 800  ;Experience points needed to gain each level
  IsTrainable = Yes                   ;Can gain experience
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet        = AmericaJetAuroraCommandSet

  ; *** AUDIO Parameters ***
  SoundAmbient = A10ThunderboltAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    SoundEject = PilotSoundEject
    VoiceEject = PilotVoiceEject
    StartDive  = A10ThunderboltDive
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 1200
    InitialHealth   = 1200
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_03
    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_JetDeathInitial
    OCLInitialDeath                 = None
    DelaySecondaryFromInitialDeath  = 500       ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = None
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_A10DeathHitGround
    DelayFinalBlowUpFromHitGround   = 200       ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_A10DeathFinalBlowUp
  End

  Behavior = PhysicsBehavior ModuleTag_05
    Mass = 500.0
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_06
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End
  
  Behavior = MissileAIUpdate ModuleTag_09
    TryToFollowTarget = Yes
    FuelLifetime = 0
    DistanceToTargetBeforeDiving = 500
  End

  Behavior = JetAIUpdate ModuleTag_07
    OutOfAmmoDamagePerSecond    = 10%    ; amount of damage to take per SEC (not per frame) when out of ammo
                                         ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift       = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause                = 500
    MinHeight                   = 5
    SneakyOffsetWhenAttacking   = -20.0  ; this is how far behind us people aim when we are in attack mode
    AttackLocomotorType         = SET_SUPERSONIC
    AttackLocomotorPersistTime  = 3000    ; we start slowing down almost immediately
    AttackersMissPersistTime    = 2000   ; but remain untargetable fer a bit longer
    ReturnForAmmoLocomotorType  = SET_NORMAL
    ReturnToBaseIdleTime        = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  
  Locomotor = SET_NORMAL      A10ThunderboltLocomotor
  Locomotor = SET_SUPERSONIC  A10ThunderboltDiveLocomotor
  Locomotor = SET_TAXIING     BasicJetTaxiLocomotor

  Behavior                = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy           = Upgrade_AmericaCountermeasures
  End

  Behavior                = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
    VolleySize            = 2     ; Number of flares launched per volley (requires bones)
    VolleyArcAngle        = 60.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       = 3     ; 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

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

  ClientUpdate         = AnimatedParticleSysBoneClientUpdate ModuleTag_22
  End

  Behavior                 = TransitionDamageFX ModuleTag_22
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Geometry = Cylinder
  GeometryIsSmall = Yes
  GeometryMajorRadius = 10.0
  GeometryMinorRadius = 10.0
  GeometryHeight = 10.0
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length
  
End


Locomotor SET_NORMAL
Code:

;------------------------------------------------------------------------------
Locomotor A10ThunderboltLocomotor
  Surfaces            = AIR
  Speed               = 120 ;55              ; in dist/sec
  SpeedDamaged        = 120 ;40         ; in dist/sec
  MinSpeed            = 45             ; in dist/sec
  TurnRate            = 200            ; in degrees/sec
  TurnRateDamaged     = 90      ; 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        = 70          ; in dist/sec
  PreferredHeight     = 150
  AllowAirborneMotiveForce = Yes
  ZAxisBehavior       = SURFACE_RELATIVE_HEIGHT
  CirclingRadius      = 100 ; 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.9                    ;  How fast it damps.  0=perfect spring, bounces forever.  1=glued to terrain.
  RollDamping = 0.8                     ;  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


This is dive SET_SUPERSONIC
Code:

;------------------------------------------------------------------------------
Locomotor A10ThunderboltDiveLocomotor
  Surfaces            = AIR
  Speed               = 120 ;55              ; in dist/sec
  SpeedDamaged        = 120 ;40         ; in dist/sec
  MinSpeed            = 45             ; in dist/sec
  TurnRate            = 200            ; in degrees/sec
  TurnRateDamaged     = 90      ; 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        = 70          ; in dist/sec
  PreferredHeight     = 50
  AllowAirborneMotiveForce = Yes
  ZAxisBehavior       = SURFACE_RELATIVE_HEIGHT
  CirclingRadius      = 100 ; 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          = HOVER

  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.9                    ;  How fast it damps.  0=perfect spring, bounces forever.  1=glued to terrain.
  RollDamping = 0.8                     ;  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


For weapon
Code:

;------------------------------------------------------------------------------
Weapon A10ThunderboltVulcanTest
  PrimaryDamage         = 10.0
  PrimaryDamageRadius   = 5.0       ; 0 primary radius means "hits only intended victim"
  ScatterRadius         = 20.0
  AttackRange           = 450.0
  DamageType            = SMALL_ARMS
  DeathType             = NORMAL
  WeaponSpeed           = 600.0          ; dist/sec (huge value == effectively instant)
  ProjectileObject      = ScorpionTankShell ;A10ThunderboltDummyVulcan
  FireFX                = WeaponFX_Comanche20mmCannonFire
  ProjectileDetonationFX = FX_DamageTankStruckSmallArms
  FireSound             = SpectreGunshipGattlingWeapon
  RadiusDamageAffects   = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots     = 10          ; time between shots, msec
  ClipSize              = 20                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime        = 500              ; how long to reload a Clip, msec
  AutoReloadsClip             = RETURN_TO_BASE 
  ProjectileCollidesWith      = STRUCTURES
  ShowsAmmoPips               = No
End

;------------------------------------------------------------------------------
Weapon A10ThunderboltMissileWeaponTest
  PrimaryDamage               = 200.0            
  PrimaryDamageRadius         = 50.0
  ScatterRadius               = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 350  
  MinimumAttackRange          = 100.0
  AcceptableAimDelta          = 30
  DamageType                  = EXPLOSION
  DeathType                   = EXPLODED
  WeaponSpeed                 = 500
  ProjectileObject            = A10ThunderboltMissile
  ProjectileExhaust           = TowMissileExhaust
  ;FireFX                      = None
  ;FireSound                   = ComancheMissileWeapon
  ProjectileDetonationFX      = FX_A10ThunderboltMissileExplosion;FX_ArtilleryBarrage
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 50
  ClipSize                    = 6 
  ClipReloadTime              = 1000 ;7000
  AutoReloadsClip             = RETURN_TO_BASE 
  ProjectileCollidesWith      = STRUCTURES
  ShowsAmmoPips               = Yes
End

thanks 1 user thanked mr_hymn_ for this useful post.
AdrianeMapMaker on 5/10/2017(UTC)
Offline mr_hymn_  
#5 Posted : Wednesday, May 10, 2017 11:14:00 PM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
SET_NORMAL and SET_SUPERSONIC having same stats but SET_SUPERSONIC will be Appearance = HOVER and PreferredHeight = 50

You can edit the value as your desire.
thanks 1 user thanked mr_hymn_ for this useful post.
AdrianeMapMaker on 5/10/2017(UTC)
Offline mr_hymn_  
#6 Posted : Wednesday, May 10, 2017 11:54:18 PM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
And if you want your A10 have a Strafing weapon like vanilla A10. I have invisible object for you to make it work because strafe weapon needs the projectile object otherwise it won't work.
In fact invisible object is not invisible it just small enough about 0.001 size (smallest value) that won't be able to see even zoom in. If you like I can upload here for usage.

Code:

StrafingWeaponSlot              = PRIMARY             ;Strafe while diving (so long target point is within weapon range)
StrafeLength                    = 450
StrafeWeaponFX                  = FX_DamageTankStruckSmallArms


BTW my A10 code also works with old General. If Elliesy wanna try with your OP GLA faction lol.
thanks 1 user thanked mr_hymn_ for this useful post.
AdrianeMapMaker on 5/10/2017(UTC)
Offline Zatsupachi  
#7 Posted : Thursday, May 11, 2017 6:08:13 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
Y'all know what could've made this easier?

COPY a generic jet object-- like a Raptor or somethin'
and just change the art code with the A10's art code.

Just then just provide the appropriate weapons.
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline qqqqqqqqqp  
#8 Posted : Thursday, May 11, 2017 7:52:06 AM(UTC)
qqqqqqqqqp
Major
Joined: 11/19/2012(UTC)
Posts: 371
United States
Location: everywhere but nowhere

Thanks: 19 times
Was thanked: 47 time(s) in 45 post(s)
But that's too easy. Tongue

Edited by user Thursday, May 11, 2017 7:53:14 AM(UTC)  | Reason: Not specified

9Q_1P at your service. Moddin help and mod maker ranges from paradrop planes, aircraftcarriers and yes snow men with death lazer eyes

Want a peek? Visit this page
Advanced warfare
Offline mr_hymn_  
#9 Posted : Thursday, May 11, 2017 10:49:16 AM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
Originally Posted by: Zatsupachi Go to Quoted Post
Y'all know what could've made this easier?

COPY a generic jet object-- like a Raptor or somethin'
and just change the art code with the A10's art code.

Just then just provide the appropriate weapons.


I did that and it's just like any other jets.
Offline acidbrain  
#10 Posted : Thursday, May 11, 2017 10:57:55 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
Originally Posted by: acidbrain Go to Quoted Post

Check other airplanes for the code, plenty of examples of how to code it properly...


Cool

Panem et kirkinses
Offline mr_hymn_  
#11 Posted : Thursday, May 11, 2017 8:48:58 PM(UTC)
mr_hymn_
Major
Joined: 2/28/2017(UTC)
Posts: 410
Thailand
Location: Bangkok

Thanks: 63 times
Was thanked: 145 time(s) in 127 post(s)
I am wasting several hours just to make A10 correctly. not so long for the gun that firing missiles properly but nearly 6 hours to make it dive. No matter what I did it's not diving at all until I made some changes.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.