Quote:
Originally Posted by Alphathon";p="
You don't need a UVWMap (Unwrap UVW etc work fine, but even tht is not needed if the texture shows up right).
Check the model in W3D viewer and see if the tread texture moves like you want.
Also, make sure the treads have the name TREADSRnn or TREADSLnn (nn = a 2 digit number) etc.
Then change the W3DTruckDraw to W3DTankTruckDraw. This will meen all lines specific to to W3DTruckDraw and W3DTankDraw will be accepted, so there should be no serious errors.
Finally, post up the code you used, coz I cant see how the method you described works, and even if it does, there is a far easier way.
Hope This helps
BTW, tht Anim ROCKS!
|
Thanks.
Ok still no animating treads but I'm getting closer I think. The W3DTankTruckDraw worked without causing any errors. Thanks. But when I checked the mech out in the W3D Viewer the treads wern't animating. I had a look at chinas construction dozer and those treads are moving slowly. So much be something to do with my model or the texture. The tread texture doesn't have to be a dds does it? Heres the code:
Code:
;------------------------------------------------------------------------------
Object UNSCVehicleConstructionMech ;Don't know what to call it. Looks like a mech to me.
; *** ART Parameters ***
SelectPortrait = UNSCConstructionMechCameoLarge
ButtonImage = UNSCConstructionMechCameo
;UpgradeCameo1 = NONE
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DTankTruckDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
TransitionKey = TRANS_Stand
Model = UMECH
ParticleSysBone = LIGHT01 ConstructionMechLights
ParticleSysBone = LIGHT02 ConstructionMechLights
ParticleSysBone = LIGHT03 ConstructionMechLights
ParticleSysBone = LIGHT04 ConstructionMechLights
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
ParticleSysBone = EXHAUSTFX02 DozerSmokeHeavy
End
TransitionState = TRANS_Constructing TRANS_Stand
Animation = UMECH_S.UMECH_S
AnimationMode = ONCE
;WaitForStateToFinishIfPossible = TRANS_Constructing
End
TransitionState = TRANS_Moving TRANS_Stand
Animation = UMECH_S.UMECH_S
AnimationMode = ONCE
;WaitForStateToFinishIfPossible = TRANS_Constructing
End
ConditionState = ACTIVELY_CONSTRUCTING
TransitionKey = TRANS_Constructing
Animation = UMECH_C.UMECH_C
AnimationMode = LOOP
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
End
ConditionState = MOVING
TransitionKey = TRANS_Moving
Animation = UMECH_M.UMECH_M
AnimationMode = LOOP
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
ParticleSysBone = EXHAUSTFX02 DozerSmokeHeavy
TransitionKey = TRANS_Moving
WaitForStateToFinishIfPossible = TRANS_CONSTRUCTING
WaitForStateToFinishIfPossible = TRANS_CONSTRUCTING
End
; ConditionState = PREATTACK_A
; Animation = UMECH_A.UMECH_A
; AnimationMode = ONCE
; ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
; ParticleSysBone = DIRTFX01 DozerDirtFall ;gush of dirt
; TransitionKey = TRANS_DIGGING
; End
ConditionState = REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
Animation = AVCONSTDOZ_AD.AVCONSTDOZ_AD
AnimationMode = ONCE
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
TransitionKey = TRANS_DIGGING_DAMAGED
End
ConditionState = MOVING REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
TrackMarks = EXTnkTrack.tga
OkToChangeModelColor = Yes
TreadAnimationRate = 2.0; amount of tread texture to move per second
;TreadDriveSpeedFraction = 0.3 ; fraction of locomotor speed below which treads stop moving.
;TreadPivotSpeedFraction = 0.6 ; fraction of locomotor speed below which we allow pivoting.
;
Dust = RocketBuggyDust
DirtSpray = RocketBuggyDirtSpray
;
;ParticlesAttachedToAnimatedBones = Yes
End
; ***DESIGN parameters ***
DisplayName = OBJECT:UNSCVehicleConstructionMech
Side = America
EditorSorting = VEHICLE
TransportSlotCount = 5 ;how many "slots" we take in a transport (0 == not transportable)
BuildCost = 1000
BuildTime = 5.0 ; in seconds
VisionRange = 200
ShroudClearingRange = 200
WeaponSet
Conditions = None
Weapon = PRIMARY None
End
WeaponSet
Conditions = MINE_CLEARING_DETAIL
Weapon = PRIMARY DozerMineDisarmingWeapon
End
ArmorSet
Conditions = None
Armor = DozerArmor ;Special Explosion-Proof Armor
DamageFX = TankDamageFX
End
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 = UNSCVehicleConstructionMechCommandSet
; *** AUDIO Parameters ***
VoiceSelect = DozerUSAVoiceSelect
VoiceMove = DozerUSAVoiceMove
VoiceGuard = DozerUSAVoiceMove
VoiceTaskComplete = DozerUSAVoiceBuildComplete
SoundMoveStart = DozerUSAMoveStart
SoundMoveStartDamaged = DozerUSAMoveStart
UnitSpecificSounds
VoiceCreate = DozerUSAVoiceCreate
VoiceNoBuild = DozerUSAVoiceBuildNot
VoiceCrush = DozerUSAVoiceCrush
VoiceRepair = DozerUSAVoiceRepair
VoiceDisarm = DozerUSAVoiceClearMine
TruckLandingSound = NoSound
TruckPowerslideSound = NoSound
VoiceEnter = DozerUSAVoiceMove
VoiceBuildResponse = DozerUSAVoiceBuild
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
Body = ActiveBody ModuleTag_02
MaxHealth = 250.0
InitialHealth = 250.0
; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
SubdualDamageCap = 500
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End
Behavior = DozerAIUpdate ModuleTag_03
RepairHealthPercentPerSecond = 2% ; % of max health to repair each second
BoredTime = 5000 ; in milliseconds
BoredRange = 150 ; when bored, we look this far away to do something
; the only "enemies" that workers can acquire are mines, to be disarmed...
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL uCMechLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 75.0
End
Behavior = StealthDetectorUpdate ModuleTag_05
DetectionRate = 500 ; how often to rescan for stealthed things in my sight (msec)
;DetectionRange = ??? ;Dustin, enable this for independant balancing!
CanDetectWhileGarrisoned = No ;Garrisoned means being in a structure that you units can shoot out of.
CanDetectWhileContained = No ;Contained means being in a transport or tunnel network.
ExtraRequiredKindOf = MINE ; we can only detect MINES, not other stealthed things
End
Behavior = TransitionDamageFX ModuleTag_06
DamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
DamagedParticleSystem2 = Bone:Smoke02 RandomBone:No PSys:SmolderingFire
DamagedParticleSystem3 = Bone:Smoke RandomBone:Yes PSys:ScorpionDamagedFireSmoke
DamagedParticleSystem4 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
DamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransitionSmall
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedParticleSystem2 = Bone:Smoke01 RandomBone:No PSys:SmolderingFire
ReallyDamagedParticleSystem3 = Bone:Smoke02 RandomBone:No PSys:SmolderingFire
ReallyDamagedParticleSystem4 = Bone:Smoke RandomBone:Yes PSys:ScorpionDamagedFireSmoke
ReallyDamagedParticleSystem5 = Bone:Smoke RandomBone:Yes PSys:ScorpionDamagedFireSmoke
ReallyDamagedParticleSystem6 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
ReallyDamagedParticleSystem7 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
; Catch fire, and explode death
Behavior = SlowDeathBehavior ModuleTag_07
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 100
DestructionDelay = 1500
DestructionDelayVariance = 600
FX = INITIAL FX_CrusaderCatchFire
OCL = FINAL OCL_AmericaDozerExplode
FX = FINAL FX_BattleMasterExplosionOneFinal
End
Behavior = CreateCrateDie ModuleTag_CratesChange
CrateData = SalvageCrateData
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 = AutoHealBehavior ModuleTag_25
HealingAmount = 12
HealingDelay = 1000 ; msec
Radius = 100.0f
StartsActive = Yes
KindOf = VEHICLE
ForbiddenKindOf = AIRCRAFT
SkipSelfForHealing = Yes
End
Behavior = FXListDie ModuleTag_23
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = DestroyDie ModuleTag_24
DeathTypes = NONE +CRUSHED +SPLATTED
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 15.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
And for the locomotor
Code:
;-----------------------------------------------------------------------------------
Locomotor uCMechLocomotor
Surfaces = GROUND
Speed = 30 ; in dist/sec
SpeedDamaged = 25 ; in dist/sec
TurnRate = 90 ; in degrees/sec
TurnRateDamaged = 60 ; in degrees/sec
Acceleration = 30 ; in dist/(sec^2)
AccelerationDamaged = 8 ; in dist/(sec^2)
Braking = 50 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
ZAxisBehavior = NO_Z_MOTIVE_FORCE
Appearance = TREADS
AccelerationPitchLimit = 5 ; Angle limit how far chassis will lift or roll from acceleration.
DecelerationPitchLimit = 5 ; Angle limit how far chassis will dip from deceleration.
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.5 ; 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.
End