logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,668
Posts: 94,539

Administrators:
DeeZire, Redemption

There are currently 44 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 03-02-2005, 07:53 AM   #1 (permalink)
Member
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 66
Send a message via MSN to liger
Default Tread Problem 8 Treads [SOLVED] thx

Hi all,

Just having a bit of trouble getting these treads to animate ingame properly. Now before someone says go read a tutorial, I have, this is waht I've done:



I've got 8 treads for this unit. 4 on the left and 4 on the right. 2 for each tread platform, one on the top and one on the bottom. They all have the same texture, which is setup properly as having that 'VPerSec=1' code in the Vertex material section, also Linear offset is slected. I've named the treads accordingly TREADSR01 for the right side first tread all the way to 4, and same for the left with TREADSL01 and so on.

My tread texture is a tga file. Is it supposed to be a dds?
The treads are linked to their respective tread platforms.
I have the following code in the units ini section:

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.

However if I uncomment the last 3 lines of code I get a serious error problem.


I Know its something simple that I'm just not thinking of, could anyone help me out?
liger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 11:33 AM   #2 (permalink)
Senior Member
 
Join Date: Jan 2004
Location: Elgin, Scotland, UK
Posts: 168
Send a message via ICQ to Alphathon Send a message via AIM to Alphathon Send a message via MSN to Alphathon Send a message via Yahoo to Alphathon
Default

Ok, I don't know if its a typo, but it should be 'UPerSec=1' not 'VPerSec=1'. Also, what type of W3DDraw tag are you using, coz I dont think they all support treads. Finally, it seems you don't need the extra lines which are commented out, coz the battlemaster don't have em, but it has treads. You only need them if you want 2 change the anim speed through code. (The reason you are getting the error could be because it can't find the anims, as I said @ the start, with the 'VPerSec=1')
Alphathon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 11:41 AM   #3 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

Nice model, let me guess, a construction unit?
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 03:32 PM   #4 (permalink)
Member
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 66
Send a message via MSN to liger
Default

Quote:
Originally Posted by Alphathon";p=&quot View Post
Ok, I don't know if its a typo, but it should be 'UPerSec=1' not 'VPerSec=1'. Also, what type of W3DDraw tag are you using, coz I dont think they all support treads. Finally, it seems you don't need the extra lines which are commented out, coz the battlemaster don't have em, but it has treads. You only need them if you want 2 change the anim speed through code. (The reason you are getting the error could be because it can't find the anims, as I said @ the start, with the 'VPerSec=1')
Changed to UPerSec, still no go. The textures on the treads dont have a UWV Map modifier on it. Does that really matter, its been unwrapped already, would that make a difference? Also am using the W3DTruckDraw tag and not the W3DTankDraw tag. For some strange reason it won't let me use the tank tag, just gives me a serious error. What do u mean by can't find the animations? I've made a serperate file for the unit while its in moving state. Also have animations for constructing and transitionstate as it going from moving to standing.

Heres an ingame preview (Just no tread animation still):
unsc Construction Mech

Quote:
Nice model, let me guess, a construction unit?
Bingo mate. For upcoming Halogen Mod.
Halogen
liger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 04:23 PM   #5 (permalink)
Senior Member
 
Join Date: Jan 2004
Location: Elgin, Scotland, UK
Posts: 168
Send a message via ICQ to Alphathon Send a message via AIM to Alphathon Send a message via MSN to Alphathon Send a message via Yahoo to Alphathon
Default

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!
Alphathon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 04:26 PM   #6 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

The W3DTankDraw should be the best option for you. There must be some reference to parts the TankDraw does not support, like "TireRotationMultiplier" or "TireBones".

You could use the W3DTankTruckDraw module instead. Check the quad cannon. It offers both Tank and Truck Draw in one module.

And you don't need the UVW Map modifier, simple unwrapping is enough. I think he meant the tread moving animation. In fact these aren't anims but moving textures. So they have nothing to do with animations in the way you created them when constructing etc.

Edit: Well someone was faster
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 04:28 PM   #7 (permalink)
Senior Member
 
Join Date: Jan 2004
Location: Elgin, Scotland, UK
Posts: 168
Send a message via ICQ to Alphathon Send a message via AIM to Alphathon Send a message via MSN to Alphathon Send a message via Yahoo to Alphathon
Default

As I just said. U must've started posting wile I was typing

Edit: I see you noticed
Alphathon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 04:37 PM   #8 (permalink)
Member
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 66
Send a message via MSN to liger
Default

Quote:
Originally Posted by Alphathon";p=&quot View Post
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
liger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 05:07 PM   #9 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Quote:
Originally Posted by Alphathon";p=&quot View Post
Ok, I don't know if its a typo, but it should be 'UPerSec=1' not 'VPerSec=1'.
Both work, and I suspect there is a WPerSec too. It simply tells the game which direction the skin should move: front/back, left/right or (whatever that means) up/down.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-02-2005, 05:14 PM   #10 (permalink)
Member
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 66
Send a message via MSN to liger
Default

Quote:
Originally Posted by ImmoMan";p=&quot View Post
Quote:
Originally Posted by Alphathon";p=&quot View Post
Ok, I don't know if its a typo, but it should be 'UPerSec=1' not 'VPerSec=1'.
Both work, and I suspect there is a WPerSec too. It simply tells the game which direction the skin should move: front/back, left/right or (whatever that means) up/down.
Yeah it does, hence U V W Mapping came about. Just says which direction to move in. Still cant get it to work tho. Did that code help at all? Cos I really dont know waht to do anymore. I've done everything.

Co-incidently, I imported the china construction dozer and then applied my tread texture (a tga) to it and set it up in the same way with VPerSec=1 under linear offset. exported and that wouldnt work either. It was working when there was no texture but now. nada.
liger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AI script problem, need help!(Solved) homura Generals & Zero Hour Editing 0 06-04-2005 09:31 PM
Problem with code[solved] Silent_Killa Generals & Zero Hour Editing 10 11-02-2004 01:25 AM
Airfeild Problem[SOLVED] RedLeader Generals & Zero Hour Editing 5 08-21-2004 01:10 AM
Auto-choosing weapons problem (SOLVED) CodeCat Generals & Zero Hour Editing 10 09-16-2003 09:54 AM
Tread Animation Problem erahndor Generals & Zero Hour Editing 2 04-20-2003 02:56 AM


All times are GMT -4. The time now is 02:58 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.