Changing variables in datablocks
by Jeff Trier · in Torque Game Engine · 03/22/2003 (9:49 pm) · 2 replies
Hi all,
I have created a variable in DataBlock PlayerData called "IsSelected". How can I change this variable?
In the code below, %obj is defined from "%obj = ContainerRayCast (%startPoint, %endPoint, %searchMasks, %player);", and is working great, but IsSelected always echo's "0".
Is this the method I should use to change a variable that lies within an objects DataBlock?
Thanks,
-Jeff
I have created a variable in DataBlock PlayerData called "IsSelected". How can I change this variable?
In the code below, %obj is defined from "%obj = ContainerRayCast (%startPoint, %endPoint, %searchMasks, %player);", and is working great, but IsSelected always echo's "0".
%obj.IsSelected = 1; // Tag Object as selected echo(%obj.getDataBlock().IsSelected);
Is this the method I should use to change a variable that lies within an objects DataBlock?
Thanks,
-Jeff
About the author
Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.
Torque Owner Harold "LabRat" Brown
Should be the correct way to check