PDA

View Full Version : How to create trucks with trailers



General_Subway
02-14-2008, 11:35 AM
Do you remember the "Big Rig"-Truck in good old CnC Generals? Its not difficult to create a truck with trailer in TW.

First, create a model of a truck with a trailer and texture it. Truck and trailer must be own meshes.
Thats my truck, not the best, but its just an example 4 this thread:

http://www.deezire.net/forums/attachment.php?attachmentid=4&stc=1&d=1203005447

Then select your truck and name it CAB (or whatever you choose)
After this, select the trailer and name it TRAILER.

Now its time to set up the pivots. The pivot's coordinates of truck and trailer must be the same. Place them at the hitch position:

http://www.deezire.net/forums/attachment.php?attachmentid=3&stc=1&d=1203005447

Export your model.

In the xml-File of your model, go to the "TruckDraw"-Module and add this (above "LeftFrontTireBone=..."):

CabRotationMultiplier ="1.0"
TrailerRotationMultiplier ="1.0"
CabBone="CAB"
TrailerBone="TRAILER"
RotationDamping ="0.7"

Last, create the needed entries in LogicCommand.xml etc.
Compile your mod and start it.

Works fine 4 me, but "don't drive over hills" ;-) .... that looks a little bit ugly