Code:
Object AmericaJetCargoPlane
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
DefaultConditionState
Model = AVCargoPln
Animation = AVCargoPln.AVCargoPln
AnimationMode = LOOP
ParticleSysBone = Propeller01 JetBlackTrailThin
ParticleSysBone = Propeller02 JetBlackTrailThin
ParticleSysBone = Propeller03 JetBlackTrailThin
ParticleSysBone = Propeller04 JetBlackTrailThin
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
End
ConditionState = DAMAGED
Model = AVCargoPln_D
Animation = AVCargoPln_D.AVCargoPln_D
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Propeller03 JetBlackTrailThin
ParticleSysBone = Propeller04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End
ConditionState = REALLYDAMAGED
Model = AVCargoPln_D
Animation = AVCargoPln_D.AVCargoPln_D
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Smoke03 JetFireLarge
ParticleSysBone = Smoke05 JetFireLarge
ParticleSysBone = Propeller03 JetBlackTrailThin
ParticleSysBone = Propeller04 JetBlackTrailThin
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
ParticleSysBone = Smoke03 JetSmokeLarge
ParticleSysBone = Smoke05 JetSmokeLarge
End
ConditionState = RUBBLE
Model = AVCargoPln_D1
Animation = AVCargoPln_D.AVCargoPln_D
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke06 JetFireLarge
ParticleSysBone = Smoke03 JetFireLarge
ParticleSysBone = Smoke05 JetFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke06 JetSmokeLarge
ParticleSysBone = Smoke03 JetSmokeLarge
ParticleSysBone = Smoke05 JetSmokeLarge
End
OkToChangeModelColor = Yes
End
Draw = W3DModelDraw ModuleTag_02
DefaultConditionState
Model = AVCargoPln_A2
Animation = AVCargoPln_A2.AVCargoPln_A2
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_OPENING
Model = AVCargoPln_A2
Animation = AVCargoPln_A2.AVCargoPln_A2
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_CLOSING
Model = AVCargoPln_A2
Animation = AVCargoPln_A2.AVCargoPln_A2
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:CargoPlane
EditorSorting = VEHICLE
Side = America
TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 100.0
ShroudClearingRange = 200
BuildCost = 2200
BuildTime = 20.0 ;in seconds
Prerequisites
Object = AmericaAirfield
Object = AmericaStrategyCenter
End
ExperienceValue = 50 50 50 50 ;Experience point value at each level
IsTrainable = No
CommandSet = Americac130CommandSet
; *** AUDIO Parameters ***
SoundAmbient = C130AmbientLoop
SoundAmbientRubble = NoSound
UnitSpecificSounds
VoiceCreate = StingerSoldierVoiceMove
Afterburner = RaptorAfterburner
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE TRANSPORT AIRCRAFT
Body = ActiveBody ModuleTag_03
MaxHealth = 1000.0
InitialHealth = 1000.0
End
ExperienceValue = 40 40 40 40 ; Experience point value at each level
Behavior = PhysicsBehavior ModuleTag_04
Mass = 500.0
End
Behavior = DeliverPayloadAIUpdate ModuleTag_09
DoorDelay = 100
MaxAttempts = 4
DropOffset = X:0 Y:0 Z:-10
DropDelay = 300 ; time in between each item dropped (if more than one)
PutInContainer = AmericaParachute
DeliveryDistance = 150
End
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 = 2
ParkingOffset = 8 ; 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
Locomotor = SET_NORMAL CINE_DragonLocomotor
Locomotor = SET_TAXIING BasicJetTaxiLocomotor
Behavior = TransportContain ModuleTag_10
Slots = 64 ; hey, it's a BIG transport
OrientLikeContainerOnExit = Yes
KeepContainerVelocityOnExit = Yes
ExitPitchRate = 30
ExitBone = WeaponA01
AllowInsideKindOf = INFANTRY VEHICLE PROJECTILE DOZER PARACHUTABLE
DoorOpenTime = 0
NumberOfExitPaths = 2
DestroyRidersWhoAreNotFreeToExit = Yes ; 'destroy' as opposed to 'kill'
End
Behavior = JetSlowDeathBehavior ModuleTag_11
DestructionDelay = 2000
RollRate = 0.0
RollRateDelta = 100% ;each frame, rollrate = rollrate * rollrateDelta
PitchRate = 0
FallHowFast = 25.0% ;Bigger is faster (can be over 100%,it's a fraction of gravity)
FXInitialDeath = FX_JetBigDeathInitial
OCLInitialDeath = OCL_AmericaJetCargoDeathStart
DelaySecondaryFromInitialDeath = 2000 ; in milliseconds This guy won't hit the ground, so this time equals the above time
OCLSecondary = OCL_AmericaJetCargoHulkDeath
FXSecondary = FX_BigPlaneDeath
; FXFinalBlowUp = FX_JetDeathFinalBlowUp
; OCLFinalBlowUp = OCL_AuroraDeathFinalBlowUp
; DeathLoopSound = MICAL NEEDS TO MAKE ME
End
ClientUpdate = AnimatedParticleSysBoneClientUpdate ModuleTag_12
End
Behavior = TransitionDamageFX ModuleTag_17
DamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
End
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
Ok now heres the commandset:
Code:
CommandSet Americac130CommandSet
1 = Command_TransportExit
2 = Command_TransportExit
3 = Command_TransportExit
4 = Command_TransportExit
5 = Command_TransportExit
6 = Command_TransportExit
7 = Command_TransportExit
8 = Command_TransportExit
9 = Command_Evacuate
12 = Command_Stop
End
Ok now here is the locomotor:
Code:
Locomotor CINE_DragonLocomotor
Surfaces = AIR
Speed = 155 ;100 ; in dist/sec
SpeedDamaged = 75 ; in dist/sec
MinSpeed = 60 ; in dist/sec
TurnRate = 85 ; in degrees/sec
TurnRateDamaged = 40 ; in degrees/sec
Acceleration = 60 ; in dist/(sec^2)
AccelerationDamaged = 30 ; in dist/(sec^2)
Lift = 120 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 90 ; in dist/(sec^2)
MinTurnSpeed = 5 ; in dist/sec
PreferredHeight = 190
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = WINGS
PitchStiffness = 0.5 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.1 ; 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 = 1.4 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardVelocityPitchFactor = 0.0 ; How much velocity will cause the front to lift/dip
LateralVelocityRollFactor = 0.1 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = Yes ; for JetSlowDeathBehavior
End
and here goes the command button:
Code:
CommandButton Command_ConstructAmericaJetCargoPlane
Command = UNIT_BUILD
Object = AmericaJetCargoPlane
TextLabel = CONTROLBAR:ConstructAmericaC130
ButtonImage = SACParatroopers
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildC130
End
Note: for the CONTROLBAR:ConstructAmerica130 and the CONTROLBAR:ToolTipUSABuildC130, I made them myself by using a CSF Editor, so if you were to directly copy down the commandbutton, you might have problems
and also, to get it to your new airfield... i will list this example:
CommandSet SidewinderAirfieldCommandSet
1 = Command_ConstructAmericaJetCargoPlane
2 = Command_ConstructAmericaJetA10Thunderbolt
3 = Command_Sell
or whatever...but...there it is... now you just gotta find a way to get the men you put inside to paradrop out instead of jumpin without a chute. But thats about it...
OH, also... if you are gonna replace the regular c130s, you might wanna make a replacement like REALAmericaJetCargoPlane and have that one have all the old code on it so that you can still do paradrops and stuff, cause if you have the buildable one try to do that stuff, it wont work; they will just hover over your base, so if you replace the old one instead of creating a new code for the buildable one, be sure to do this, and fix everything it drops in the Object Creation List.