and to make it so that the c130 lands how you want it, just modify the locomotor a bit so that his pitch is just right, his approach is also a factor. You might want to make a "SET_SLUGGISH" locomotor just for landing, so that he wont be all up in the air and spiral down like the raptor. You also have to set the min landing height for the airfield (faction building). I will show you some of the code for my harrier to give you an example.
[Faction Unit.ini]
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
ReturnForAmmoLocomotorType = SET_SLUGGISH
ReturnToBaseIdleTime = 10000 ; if idle for this long, return to base, even if not out of ammo
ParkingOffset = 3 ; scooch it a little forward so the tail doesn't hit the doors
ReturnToBaseIdleTime = 3 ; if idle for this long, return to base, even if not out of ammo
End
Locomotor = SET_NORMAL HarrierLocomotor
Locomotor = SET_TAXIING HarrierJetTaxiLocomotor
Locomotor = SET_SLUGGISH HarrierCruiseLocomotor
[locomotor.ini]
Locomotor HarrierLocomotor
Surfaces = AIR
Speed = 209 ; in dist/sec
SpeedDamaged = 152 ; in dist/sec
; MinSpeed = 0 ; in dist/sec
; !!! DO NOT REDUCE MinSpeed BELOW 60 UNTIL LANDINGS ARE FIXED (srj)
MinSpeed = 40 ; in dist/sec
TurnRate = 20 ; in degrees/sec
TurnRateDamaged = 10 ; in degrees/sec
Acceleration = 5 ; in dist/(sec^2)
AccelerationDamaged = 3 ; in dist/(sec^2)
Lift = 70 ; in dist/(sec^2)
LiftDamaged = 70 ; in dist/(sec^2)
Braking = 100 ; in dist/(sec^2)
MinTurnSpeed = 30 ; in dist/sec
PreferredHeight = 130
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
CirclingRadius = 60 ; 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
; this applies only in "ultra-accurate" mode, and is a fudge factor that allows
; us to "slide into place" (rather than turning) when we get close to our destination.
; the magnitude is basically the number of msec it would take us to reach the dest
; at our max speed; if we're under this threshold, we just slide into place...
SlideIntoPlaceTime = 70
PitchInDirectionOfZVelFactor = 0.0 ; how much to pitch according to our z-vel. 0=none,
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 = 0.9 ; 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.1 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = Yes ; HelicopterSlowDeathBehavior needs this to function correctly
End
;================================================= ===
Locomotor HarrierJetTaxiLocomotor
Surfaces = GROUND AIR
Speed = 10 ; in dist/sec
SpeedDamaged = 7 ; in dist/sec
TurnRate = 30 ; in degrees/sec
TurnRateDamaged = 30 ; in degrees/sec
Acceleration = 10 ; in dist/(sec^2)
AccelerationDamaged = 8 ; in dist/(sec^2)
Braking = 999999 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
ZAxisBehavior = NO_Z_MOTIVE_FORCE
Appearance = TREADS ; so we can turn in place...
End
;================================================= ===
Locomotor HarrierCruiseLocomotor
Surfaces = AIR
Speed = 185 ; in dist/sec
SpeedDamaged = 120 ; in dist/sec
; MinSpeed = 80 ; in dist/sec
; !!! DO NOT REDUCE MinSpeed BELOW 60 UNTIL LANDINGS ARE FIXED (srj)
MinSpeed = 20 ; in dist/sec
TurnRate = 100 ; in degrees/sec
TurnRateDamaged = 100 ; in degrees/sec
Acceleration = 20 ; in dist/(sec^2)
AccelerationDamaged = 10 ; in dist/(sec^2)
Lift = 60 ; in dist/(sec^2)
LiftDamaged = 50 ; in dist/(sec^2)
Braking = 10 ; in dist/(sec^2)
MinTurnSpeed = 50 ; in dist/sec
PreferredHeight = 130
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
CirclingRadius = 240 ; 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 = 3.2 ; how much to pitch according to our z-vel. 0=none, 1=lots (0=default)
PitchStiffness = 0.3 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.2 ; 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.8 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 60
LocomotorWorksWhenDead = Yes ; JetSlowDeathBehavior needs this to function correctly
End
****
The landing items are here:
In the JetAIUpdate Module, you can see it says:
ReturnForAmmoLocomotorType = SET_SLUGGISH and then it says
Locomotor = SET_SLUGGISH HarrierCruiseLocomotor
this means that when it goes to return, it uses this locomotor. If you use this method, you can change the way the plane flies when it is just cruising normaly, when it is taxiing, when it is attack, and when it is returning to base to land. And that is why i have 3 different locomotors listed up there, because i want my harrier to fly 3 different ways when it is flying. I want it to taxi upwards for liftoff, i want it to cruise and fly a certain way, and i want it to come in for landing a certain way.
|