Trying to add a new vehicle class
by Richard Marrevee · in Torque 3D Professional · 08/11/2011 (11:49 am) · 2 replies
I am trying to add a new sort of vehicle class, so I copied most of the wheeledvehicledata and wheeledvehicle code into this new class and ripped all the wheel stuff. Rebuild the engine which did ok.
In script I setup a new datablock for this new class and some onAdd functions and so, all is well, but when I try to add this thing in the world editor I get a message in the console:
<input> (0): Unable to find function MyNewVehicleData::Create
Now the question is: what am I doing wrong? Looking at wheeledVehicleData I can't find a create function. Or is this a script part?
Help is appreciated.
Thanks anyway
In script I setup a new datablock for this new class and some onAdd functions and so, all is well, but when I try to add this thing in the world editor I get a message in the console:
<input> (0): Unable to find function MyNewVehicleData::Create
Now the question is: what am I doing wrong? Looking at wheeledVehicleData I can't find a create function. Or is this a script part?
Help is appreciated.
Thanks anyway
About the author
Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com
Torque Owner Alfio Saitta
Collateral Studios
(around line 1080)
function HoverVehicleData::create(%block) { %obj = new HoverVehicle() { dataBlock = %block; parentGroup = EWCreatorWindow.objectGroup; }; return(%obj); }Add:
function MyNewVehicleData::create(%block) { %obj = new MyNewVehicle() { dataBlock = %block; parentGroup = EWCreatorWindow.objectGroup; }; return %obj; }Check this