The concept of datablocks.
by MK · in Torque Game Engine · 07/12/2002 (1:36 pm) · 6 replies
Can somebody please explain to me the concept of datablocks.
What are they used for?
In what circumstances should they be used? rather than member variables in C++ objects or script variables?
And any other info.
Thanx.
What are they used for?
In what circumstances should they be used? rather than member variables in C++ objects or script variables?
And any other info.
Thanx.
#2
07/13/2002 (6:11 pm)
This might help: scripting language reference; there's a brief section on datablocks.
#3
mass,
size,
gravity? for some levels I suppose
weapon default
outfitA.
any thoughts? but also, I am i on the right path in thinking in this direction?
06/24/2009 (4:12 pm)
I am wondering what all the variables one could ad to a dataBlock catagory are?mass,
size,
gravity? for some levels I suppose
weapon default
outfitA.
any thoughts? but also, I am i on the right path in thinking in this direction?
#4
Rennie - different types of datablocks let you store different sets of values. Have a look at TDN if you have access, there's lots of resources telling you what values can be put in what datablocks.
06/25/2009 (1:16 am)
MK - Datablocks are invisible objects that hold data about other objects of a specific 'class'. For example, you would have one datablock for all BMW M6s which holds values for their engine torque, BHP, default weight, etc - since these values are the same for all M6 cars. You'd have another datablock for a different type of car, since its torque, BHP and mass are probably different.Rennie - different types of datablocks let you store different sets of values. Have a look at TDN if you have access, there's lots of resources telling you what values can be put in what datablocks.
#5
http://www.garagegames.com/community/forums/viewthread/92321
06/25/2009 (4:03 am)
This was a good post on it:http://www.garagegames.com/community/forums/viewthread/92321
Torque Owner Chris \"Hobbiticus\" Weiland