How do you access datablocks from the gui?
by Josh Albrecht · in Torque Game Engine · 08/17/2001 (7:50 pm) · 3 replies
I have written a gui thing that will let me assign values to variables. How do I point to the vehicle that I am riding on from the gui files? What is the name of the variable? How would I access the actual values in the datablock's *.cs file?
This would make more sense if I knew how things worked in a general way. All I know is that datablocks are loaded when a vehicle is created. is there a way to reasign a datablock variable's value on the fly?
Sorry if the post is confusing, i am terribly confused... :(
This would make more sense if I knew how things worked in a general way. All I know is that datablocks are loaded when a vehicle is created. is there a way to reasign a datablock variable's value on the fly?
Sorry if the post is confusing, i am terribly confused... :(
#2
That should be very usefull.
08/19/2001 (12:00 pm)
Hey, thanks alot! Somehow that post slipped through. I had never seen it before, even though I check back here and read them all about 6 times a day...That should be very usefull.
#3
%variable = %datablock. mainThrustForce;
I don't think you can make changes to one specific instantiation of a datablock object with the current setup.
There are probably ways around this though... I'd look into %obj.getdatablock, %obj.setdatablock, and TransmitDataBlocks
08/20/2001 (12:25 am)
%datablock = %obj.getdatablock();%variable = %datablock. mainThrustForce;
I don't think you can make changes to one specific instantiation of a datablock object with the current setup.
There are probably ways around this though... I'd look into %obj.getdatablock, %obj.setdatablock, and TransmitDataBlocks
Torque Owner Tim Gift