Anyone could help me understand use of datablocks?
by Corin · in Torque Game Engine · 01/11/2005 (7:16 am) · 4 replies
About the author
#2
Also, you should get a copy of Kenneth Finney's "3D Game Programming All in One". I found it a great help.
Regards,
01/12/2005 (9:54 am)
Look under the torque documentation section. I think theres a help (.chm) file floating around somehwhere that gives details as to the parameters each datablock can take.Also, you should get a copy of Kenneth Finney's "3D Game Programming All in One". I found it a great help.
Regards,
#3
01/12/2005 (10:08 am)
It is good to be aware that the properties in the datablocks are sent to the server and are essentially static.
#4
01/13/2005 (12:44 am)
Yep, thats the one.
Torque Owner Ian Dale
datablock StaticShapeData(Door1)
{
category = "Door";
itemselectable = true;
shapefile = "~/data/shapes/doors/door1.dts";
emap = FALSE;
cloaktexture = "~/data/shapes/doors/null";
dooropen = false;
};
To now create the object say in a mission file, you would enter something like:
new StaticShape() {
position = "95.4578 -263.54 51.7484";
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "Door1"; <--- DATABLOCK Definitions
};
In other words information such as an objects shape file are defined in it's datablock, other info such as where it's placed is defined at creation time.