Game Development Community

Change car in a record

by CodingChris · in Torque Game Engine · 08/11/2007 (10:48 am) · 1 replies

Hi,
first what I have: I got Torque working with this resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11159

now what I need: I need a GUI where the player can change the car, this means I'll need a guiobjectview...

Now what I want: Is it possible to replace the car in the record with the car the player has selected?
Hope for help.

#1
08/15/2007 (12:53 pm)
One way to implement a selected car is in the script where you create the car. Here, you would just use the specific pre-selected datablock, rather than one hardcoded datablock name. (This implies that you would have a different datablock for each car available.)

%carBlock = "Car_Camaro";
	
%vehicle = new WheeledVehicle()
{
    datablock = %carBlock;
};