PDA

View Full Version : Re-enabling Hovering Crusader



Black_Eagle
03-07-2003, 04:39 PM
im trying to re-enable the hovering crusader but im having a problem

when i tell the tank to enter the water, it goes into the water and the hovering animation plays (the animation where its tracks go back) and the tank hovers along the water like its supposed to (pic 2), but then when it stops in the water its tracks come down again as if it were going along the ground (pic 1)

can anyone tell me whts wrong with my code tht makes it do tht?

heres my code

FactionUnit.ini

Object AmericaTankCrusader

; *** ART Parameters ***
SelectPortrait = SACLeopard_L
ButtonImage = SACLeopard

UpgradeCameo1 = Upgrade_AmericaBattleDrone
UpgradeCameo2 = Upgrade_AmericaScoutDrone
UpgradeCameo3 = Upgrade_AmericaAdvancedTraining
UpgradeCameo4 = Upgrade_AmericaCompositeArmor
;UpgradeCameo5 = NONE

Draw = W3DTankDraw ModuleTag_01
DefaultConditionState
Model = AVCrusader
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = OVER_WATER
Model = AVCrusader_H
ParticleSysBone = TreadFX01 AmphibWaveRest
Animation = AVCrusader_A.AVCrusader_A
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = MOVING
Model = AVCrusader
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = MOVING OVER_WATER
Model = AVCrusader_H
; ParticleSysBone = Exhaust01 SteamVent
; ParticleSysBone = Exhaust02 SteamVent

ParticleSysBone = Mist01 AmphibMist
ParticleSysBone = Mist02 AmphibMist
ParticleSysBone = Mist03 AmphibMistSide
ParticleSysBone = Mist04 AmphibMistSide
ParticleSysBone = TreadFX01 AmphibWave
ParticleSysBone = TreadFX02 AmphibWave
End
ConditionState = REALLYDAMAGED
Model = AVCrusader_D
End
ConditionState = RUBBLE
Model = AVCrusader_D
End

Locomotor.ini

Locomotor CrusaderLocomotor
Surfaces = GROUND WATER
Speed = 30 ; in dist/sec
SpeedDamaged = 25 ; in dist/sec
TurnRate = 180 ;90 ; in degrees/sec
TurnRateDamaged = 180 ;60 ; in degrees/sec
Acceleration = 1000 ;240 ;30 ; in dist/(sec^2)
AccelerationDamaged = 1000 ;120 ; in dist/(sec^2)
Lift = 120 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 1000 ;50 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
PreferredHeight = 4 ; at 1, 2, 3, the unit shakes from rounding. at 0 the SurfaceRelativeHeight flag is ignored.
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = HOVER

AccelerationPitchLimit = 5 ; Angle limit how far chassis will lift or roll from acceleration.
PitchStiffness = 0.05 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.025 ; stiffness of the "springs" in the suspension side to side.
PitchDamping = 0.8 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
RollDamping = 0.3 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardAccelerationPitchFactor = 0.3 ; How much acceleration will cause the front to lift, or dip for stops.
LateralAccelerationRollFactor = 0.33 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
End

thanks

Zainal
03-07-2003, 06:27 PM
Its nice to see something I can acctually help with.

Here's the code I used:

Object AmericaTankCrusader2

; *** ART Parameters ***
SelectPortrait = SACCrusader
ButtonImage = SACCrusader

UpgradeCameo1 = Upgrade_AmericaBattleDrone
UpgradeCameo2 = Upgrade_AmericaScoutDrone
UpgradeCameo3 = Upgrade_AmericaAdvancedTraining
UpgradeCameo4 = Upgrade_AmericaCompositeArmor
;UpgradeCameo5 = NONE

Draw = W3DTankDraw ModuleTag_01
DefaultConditionState
Model = AVcrusader
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = REALLYDAMAGED
Model = AVcrusader_D
End
ConditionState = RUBBLE
Model = AVcrusader_D
End

OkToChangeModelColor = Yes

ConditionState = Moving
TransitionKey = TRANS_LAND
End

ConditionState = Moving REALLYDAMAGED
Model = AVCrusader_D
TransitionKey = TRANS_LAND
End

ConditionState = Moving RUBBLE
Model = AVCrusader_D
TransitionKey = TRANS_LAND
End

ConditionState = Over_water
Model = avcrusader_h
ParticleSysBone= Treads01 AmphibWaveRest
ParticleSysBone= Treads02 AmphibWaveRest
ParticleSysBone= Treads03 AmphibWaveRest
ParticleSysBone= Treads04 AmphibWaveRest
TransitionKey = TRANS_WATER
End
AliasConditionState = REALLYDAMAGED OVER_WATER
AliasConditionState = RUBBLE OVER_WATER

ConditionState = Moving Over_water
Model = avcrusader_h
ParticleSysBone= Treads01 AmphibWave
ParticleSysBone= Treads02 AmphibWave
ParticleSysBone= Treads03 AmphibWave
ParticleSysBone= Treads04 AmphibWave
TransitionKey = TRANS_WATER
End
AliasConditionState = REALLYDAMAGED MOVING OVER_WATER
AliasConditionState = RUBBLE MOVING OVER_WATER

TransitionState = TRANS_LAND TRANS_WATER
Animation = AVCRUSADER_A.AVCRUSADER_A
ParticleSysBone= Treads01 AmphibWave
ParticleSysBone= Treads02 AmphibWave
ParticleSysBone= Treads03 AmphibWave
ParticleSysBone= Treads04 AmphibWave
AnimationMode = ONCE
End

TransitionState = TRANS_WATER TRANS_LAND
Animation = AVCRUSADER_A.AVCRUSADER_A
AnimationMode = ONCE_BACKWARDS
End

End

Use the transitionstate to play the animation when you move from land to water.

Once you've specified the weapon bones in the defaultstate you dont need them in any other state.

The hovermodel doesn't actually have a mist bone or a threadfx bone. The code above puts the particle system on the threads.

With the locomotor your currently using your tank will be floating slightly while on land. Rename your current locomotor to crusaderhover and only let it travel over water. Then get the original crusaderlocomotor as well. Put them both on your unit and it will use one on land and one on water. This will prevent your tank from floating 4 units while on land.

If you have any more question feel free to ask.

Black_Eagle
03-07-2003, 06:30 PM
thanks for the help ill try it out, and how do i give it 2 locomotors?

Black_Eagle
03-07-2003, 06:32 PM
dont worry DZ just posted a tutroail on how to do it so i iwll follow tht

thanks for ur help

DeeZire
03-07-2003, 06:33 PM
Use my tutorial and it works properly;-
http://online.deezire.net/modules.php?name=Sections&op=viewarticle&artid=28