How to define a brand new object?
by Benton Lam · in Torque Game Engine · 09/09/2008 (1:15 pm) · 4 replies
This is totally a newbie question:
How do you define a brand new object? Something that doesn't depend on SimObject, etc...
I tried something like %var = new Object(); but torsion gives a parse error...
How do you define a brand new object? Something that doesn't depend on SimObject, etc...
I tried something like %var = new Object(); but torsion gives a parse error...
About the author
Recent Threads
#2
09/09/2008 (1:22 pm)
%player = new Player()
{
dataBlock = %body_type;
client = %this;
};%this.camera = new AdvancedCamera()
{
dataBlock = AdvCameraData;
};
#3
09/09/2008 (1:41 pm)
You can setup new datablocks like this (usually in another .cs file)datablock AdvancedCameraData(AdvCameraData)
{
thirdPersonOffset = "0 -3 3";
};
#4
Also, a ScriptObject is a good general object type (although it may be a TGB only thing; you'll have to try it).
09/09/2008 (2:32 pm)
What are you trying to do with it?Also, a ScriptObject is a good general object type (although it may be a TGB only thing; you'll have to try it).
Torque Owner Timothy Castagna
TK Games LLC