Game Development Community

Milkshape vehicles...

by Lane Anderson · in Torque Game Engine · 09/12/2004 (12:33 pm) · 10 replies

How do I create vehicles set up for TGE in milkshape? i see a chapter in the docs about vehicle setup, but for 3dsMAX. I am assuming I need to make special bones/flags, for the wheels, etc.? Please bear with me, I don't have much experience with Torque :)

#1
09/12/2004 (12:48 pm)
When I did my first vechile I used Harold "LabRat" Brown example he posted a while back. The thread is at: Topic: Car with weapon mounts

Hope that helps.
#2
09/13/2004 (4:57 pm)
Ok, i got the deathcar mod working(very cool, BTW), but it wont shoot :(. how can i fix this? as i said, please bear with me, im a lowly n00b :D
#3
09/13/2004 (5:27 pm)
Not sure what the problem might be, but here are some things you can try:
1 - Delete all your .dso files. This will cause the .cs files to be re-compiled. Sometimes that helps.
2 - Ensure ~/data/shapes/car/carbow.dts is in the correct location.
3 - Attempt to fire the gun and then open the console window (by pressing the "~") Sometimes that has hits to objects not found or other issues.

hope that helps.
#4
09/14/2004 (2:36 pm)
Ok, i deleted all the DSO's, and it didnt help. However, when i click while im running the mod, and then open the console, i get this:

deathcar/server/scripts/car.cs (344): register object failed for object "null" of class projectile

Set::add: object "0" doesn't exist


Line 344 is the ending bracket of the following function:

%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialVelocity = %muzzleVelocity;
initialDirection = %obj.getMuzzleVector(%slot);
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
vehicleObject = %vehicle;
};
#5
09/15/2004 (2:44 am)
Hmmm. I didn't run into that error back when I had it in my code. But then again that was a while ago and I might have just fixed it.

Try commenting out "vehicleObject = %vehicle;" Before that code it sets %vehicle = 0; which seems a bit odd. I looked at other examples of "new (%data.projectileType)" and those examples didn't have the "vehicleObject" in them.

Sorry I can't be of more help.
#6
09/15/2004 (12:30 pm)
Nope, I just get the same error :(. Does anyone else have deathcar working with the curent version of Torque? Or can anyone assist me in fixing it? I fiddled around, but the code looked hunky-dory to me, with my limited TGE experience.
#7
09/15/2004 (1:40 pm)
Lane,

The problem is that the "Crossbow" shape is not part of the deathcar/racing demo so it does not know how to create it. The "Crossbow" is what the car fires by default.

To fix do the following:

Alter "game.cs" to have the following code:
Parent::onServerCreated();
   exec("./crossbow.cs");  // This is the line to add. The rest should already be there.
   exec("./car.cs");

Copy Crossbow.cs from the demo to deathcar\server\scripts (same directory as the car.cs)

Copy the following directories from the demo:
crossbow
particles
to:
deathcar\data\shapes (the same directory as the directory "car")

Delete all your .dso files to get a clean compile.

That should be all you need. Now when you run your car you will be fire crossbows.

At least thats what I needed to do to get the car up and running.
#8
09/15/2004 (1:48 pm)
PS - I discovered the issue by pressing the "~" key and scrolling back until I found "loading compiled script deathcar/server/scripts/car.cs" Right below that it stated:
"Object 'CrossbowProjectile' is not a member of the 'ProjectileData' data block class"

Its always good to see if there are any error compiling or loading a file.


hope that helps,
#9
09/15/2004 (2:20 pm)
Yes! Works perfectly!! Thanks so much, man :D
#10
09/17/2009 (3:46 pm)
what would be the joint name for making my own car