Just a note, make sure your dummies have a ground locomotor, if they don't technically they can't 'get out' of the vehicle and somehow you end up with the vehicle being in a strange inbetween rider state.
also, just use transition states between the two rider states for your animations.
Here's an example using the old Leopard Tank model buried in the w3d big...
Code:
;****These are the dummy riders
Object LeopardTracks
VisionRange = 0.0
EditorSorting = SYSTEM
Draw = W3DModelDraw ModuleTag_NOTREALLYADRAW
DefaultConditionState
Model = None
;ParticleSysBone = None
End
End
UnitSpecificSounds
VoiceCreate = GattlingWeaponLoopLevel1;Tracks
End
Behavior = AIUpdateInterface ModuleTag_04
AutoAcquireEnemiesWhenIdle = No
End
Locomotor = SET_NORMAL BasicHumanLocomotor
TransportSlotCount = 1
KindOf = NO_COLLIDE UNATTACKABLE INERT
Body = ImmortalBody ModuleTag_01
MaxHealth = 1
InitialHealth = 1
End
Behavior = DeletionUpdate ModuleTag_03
MinLifetime = 1 ;one pulse
MaxLifetime = 1
End
End
Object LeopardHover
VisionRange = 0.0
EditorSorting = SYSTEM
Draw = W3DModelDraw ModuleTag_NOTREALLYADRAW
DefaultConditionState
Model = None
;ParticleSysBone = None
End
End
UnitSpecificSounds
VoiceCreate = GattlingWeaponLoopLevel1; Hover
End
Behavior = AIUpdateInterface ModuleTag_04
AutoAcquireEnemiesWhenIdle = No
End
Locomotor = SET_NORMAL BasicHumanLocomotor
TransportSlotCount = 1
KindOf = NO_COLLIDE UNATTACKABLE INERT
Body = ImmortalBody ModuleTag_01
MaxHealth = 1
InitialHealth = 1
End
Behavior = DeletionUpdate ModuleTag_03
MinLifetime = 1 ;one pulse
MaxLifetime = 1
End
End
;****The OCLs
ObjectCreationList OCL_RIDER1
CreateObject
ObjectNames = LeopardTracks
Count = 1
ContainInsideSourceObject = Yes
End
End
ObjectCreationList OCL_RIDER2
CreateObject
ObjectNames = LeopardHover
Count = 1
ContainInsideSourceObject = Yes
End
End
;****Upgrades
Upgrade Upgrade_RIDER2
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = SSOLBunker
UnitSpecificSound = OverlordExpansion
End
Upgrade Upgrade_RIDER1
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = SSOLBunker
UnitSpecificSound = OverlordExpansion
End
;****And here's the tank!
Object Leopard
; *** ART Parameters ***
SelectPortrait = SACLeopard_L
ButtonImage = SACLeopard
UpgradeCameo1 = NONE
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DModelDraw ModuleTag_Rider01
OkToChangeModelColor = Yes
;Normal Tank
;------------------------------
DefaultConditionState
Model = AVCrusader_A
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Drive
End
AliasConditionState RIDER1
ConditionState = REALLYDAMAGED
Model = avcrusader_d
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Drive
End
AliasConditionState RIDER1 REALLYDAMAGED
ConditionState = MOVING
Model = AVCrusader_A
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 QuadCannonDust
ParticleSysBone = TreadFX02 QuadCannonDust
TransitionKey = TRANS_Drive
End
AliasConditionState RIDER1 MOVING
ConditionState = MOVING REALLYDAMAGED
Model = avcrusader_d
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 QuadCannonDust
ParticleSysBone = TreadFX02 QuadCannonDust
TransitionKey = TRANS_Drive
End
AliasConditionState RIDER1 MOVING REALLYDAMAGED
TransitionState = TRANS_Drive TRANS_Hover
Model = AVCrusader_A
HideSubObject = TurretFX01
Animation = AVCRUSADER_A.AVCRUSADER_A
AnimationMode = ONCE
End
TransitionState = TRANS_Hover TRANS_Drive
Model = AVCrusader_A
HideSubObject = TurretFX01
Animation = AVCRUSADER_A.AVCRUSADER_A
AnimationMode = ONCE_BACKWARDS
End
;Hover Mode
;------------------------------
ConditionState RIDER2
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Hover
End
ConditionState = REALLYDAMAGED RIDER2
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Hover
End
ConditionState = RIDER2 MOVING
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 QuadCannonDust
ParticleSysBone = TreadFX02 QuadCannonDust
TransitionKey = TRANS_Hover
End
ConditionState = RIDER2 MOVING OVER_WATER
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 AmphibWave
ParticleSysBone = TreadFX02 AmphibWave
TransitionKey = TRANS_Hover
End
ConditionState = RIDER2 MOVING REALLYDAMAGED
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
;ParticleSysBone = TreadFX01 QuadCannonDust
;ParticleSysBone = TreadFX02 QuadCannonDust
TransitionKey = TRANS_Hover
End
ConditionState = RIDER2 MOVING REALLYDAMAGED OVER_WATER
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 AmphibWave
ParticleSysBone = TreadFX02 AmphibWave
TransitionKey = TRANS_Hover
End
End
; ***DESIGN parameters ***
DisplayName = UPGRADE:hovertank
Side = Civilian
EditorSorting = VEHICLE
TransportSlotCount = 3
WeaponSet
Conditions = None
Weapon = PRIMARY CrusaderTankGun
Weapon = SECONDARY SentryDroneGun
;Weapon = TERTIARY SentryDroneGun
End
WeaponSet
Conditions = WEAPON_RIDER2
;Weapon = PRIMARY CrusaderTankGun
Weapon = SECONDARY SentryDroneGun
;Weapon = TERTIARY SentryDroneGun
End
ArmorSet
Conditions = None
Armor = UpgradedTankArmor
DamageFX = TankDamageFX
End
BuildCost = 900
BuildTime = 10.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
ExperienceValue = 100 100 200 400 ;Experience point value at each level
ExperienceRequired = 0 200 300 600 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrusherLevel = 2 ;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 = RIDER1CommandSet
; *** AUDIO Parameters ***
VoiceSelect = CrusaderTankVoiceSelect
VoiceMove = CrusaderTankVoiceMove
VoiceGuard = CrusaderTankVoiceMove
VoiceAttack = CrusaderTankVoiceAttack
;SoundMoveStart = CrusaderTankMoveStart
;SoundMoveStartDamaged = CrusaderTankMoveStart
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = CrusaderTankVoiceCreate
VoiceEnter = CrusaderTankVoiceMove
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = CrusaderTankVoiceCrush
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 480
InitialHealth = 480
SubdualDamageCap = 960
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 180 ;60 // turn rate, in degrees per sec
ControlledWeaponSlots= PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL CrusaderLocomotor
Locomotor = SET_SLUGGISH BasicAmphibiousLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
End
Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -CRUSHED -SPLATTED
DestructionDelay = 0
DestructionDelayVariance = 100
FX = INITIAL FX_GenericTankDeathEffect
OCL = INITIAL OCL_LeopardDie
FX = FINAL FX_AmericaVehicleTomahawkDeathExplosion
End
Behavior = TransitionDamageFX ModuleTag_12
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = DestroyDie ModuleTag_13
DeathTypes = NONE +CRUSHED +SPLATTED
End
; A crushing defeat
Behavior = FXListDie ModuleTag_14
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_15
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = CreateCrateDie ModuleTag_CratesChange
CrateData = SalvageCrateData
;CrateData = EliteTankCrateData
;CrateData = HeroicTankCrateData
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
Behavior = RiderChangeContain ModuleTag_99
;A list of each valid rider that is allowed to ride this object. Each rider is
;assigned a modelcondition state, a weaponset flag, an object status bit, and
;a commandset override. The actual object is hidden inside the container so the
;visible rider is fluff. Also riders are deleted (not killed) when the bike is
;destroyed, so all deaths must be OCLs on the bike.
Rider1 = LeopardTracks RIDER1 WEAPON_RIDER1 STATUS_RIDER1 GLAVehicleCombatBikeDefaultCommandSet SET_NORMAL
Rider2 = LeopardHover RIDER2 WEAPON_RIDER2 STATUS_RIDER2 GLAVehicleCombatBikeDefaultCommandSet SET_SLUGGISH
;ScuttleDelay = 1500
;ScuttleStatus = TOPPLED
;Standard TransportContain stuff
Slots = 1
ScatterNearbyOnExit = No
HealthRegen%PerSec = 0
DamagePercentToUnits = 100%
BurnedDeathToUnits = No ; And no Burned death.
AllowInsideKindOf = INERT
ExitDelay = 250
NumberOfExitPaths = 1
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
DoorOpenTime = 0
End
Behavior = ProductionUpdate ModuleTag_94
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = ObjectCreationUpgrade ModuleTag_98
UpgradeObject = OCL_RIDER1
TriggeredBy = Upgrade_RIDER1
End
Behavior = ObjectCreationUpgrade ModuleTag_97
UpgradeObject = OCL_RIDER2
TriggeredBy = Upgrade_RIDER2
End
Behavior = CommandSetUpgrade ModuleTag_96
TriggeredBy = Upgrade_RIDER1
RemovesUpgrades = Upgrade_RIDER2
CommandSet = RIDER1CommandSet
End
Behavior = CommandSetUpgrade ModuleTag_95
TriggeredBy = Upgrade_RIDER2
RemovesUpgrades = Upgrade_RIDER1 Upgrade_RIDER2
CommandSet = RIDER2CommandSet
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End