Game Development Community

Process of adding new vehicle to game

by Keith Hershey Jr. · in Torque Game Engine · 08/29/2005 (12:15 am) · 3 replies

Can someone explain the process of adding a new vehicle to the game. I have muddled around looking at the scripts and trying to put a few models in the game but after checking the console I keep seeing an error creating shape. I don't expect anyone to take me through the whole process. I just need a little brief overview on how to to add a vehicle.

Thanks

#1
08/29/2005 (1:22 am)
I suggest you take a look at the racing starter kit.
The model is under shapes/buggy or shapes/car (don't remember exactly).
The script is under server/scripts. The name is car.cs I think (or buggy.cs again). Just modify the paths to the model to add your own one.

This is all you need. The car can be added thru the ingame editor. Be sure to make it mountable (mountable = 1).

It's also possible that your car model is set up the wrong way. Maybe take a look at one of the resources about this topic.
#2
08/29/2005 (1:22 am)
What exactly are you having problems with?

Creating the shape?

Getting your shape in game?

Just the scripts in game?

Something else?
#3
08/29/2005 (3:45 am)
If your vehicle is a valid shape you put it in a folder under Shapes. Torque will automatically read it then post it in the World Editot Creator list. In-game hit 'F11' and the editor will come up. Then select World Creator Editor from the menu. You should then see a file tree. Click on Shapes. If your scripts are label properly you should see a folder for Vehicles and your model should appear in that list. Click the name of your model and it will drop in the game.

That's if you just want to add a vehicle that your player model can jump in and drive. If you want your vehicle to spawn at game start as if it were the player you have to assign the vehicle model under functionGame Connection in the serverside game.cs script.

Hope that helps.