Adding a Vector to ShapeBase
by Justin White · in Torque Game Engine · 07/24/2007 (11:26 am) · 0 replies
I'm having problems declairing a new Vector variable to ShapeBase. When I do this, the program crashes when loading mission objects, either halfway through or at the end.
I thought my problem lies in the fact that I had the variable declared in the wrong "Public" section (There are three sections marked 'public' and I'm not sure I understand the difference.) but moving the declaration arround proved to no avail.
Do I need to initialize this variable with data when objects are created? If so, how do I do that and where do I do that?
OR is the problem that existing objects in missions do not have this variable, so the program dosn't understand how to read them since they have a different number of variables? If this is the case, how do I either a) fix existing maps or b) create a new 'blank' map to work with without any objects at all to make it crash.
I am attempting to implement the Mesh Hiding resource found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5421
which is based off of the resource found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2150
These two resources differ in the location of this variable. The original node hiding resource has the variable under Protected, and the Mesh Hiding resource has it under Public. What is the difference?
The resources themselves are not the problem, if I un-implement everything except the variable declaration, I encounter crashing on object loading, so I reason that implementing the variable in and of itself is the problem.
I thought my problem lies in the fact that I had the variable declared in the wrong "Public" section (There are three sections marked 'public' and I'm not sure I understand the difference.) but moving the declaration arround proved to no avail.
Do I need to initialize this variable with data when objects are created? If so, how do I do that and where do I do that?
OR is the problem that existing objects in missions do not have this variable, so the program dosn't understand how to read them since they have a different number of variables? If this is the case, how do I either a) fix existing maps or b) create a new 'blank' map to work with without any objects at all to make it crash.
I am attempting to implement the Mesh Hiding resource found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5421
which is based off of the resource found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2150
These two resources differ in the location of this variable. The original node hiding resource has the variable under Protected, and the Mesh Hiding resource has it under Public. What is the difference?
The resources themselves are not the problem, if I un-implement everything except the variable declaration, I encounter crashing on object loading, so I reason that implementing the variable in and of itself is the problem.
About the author