Class Comparison Issues [T2D] [Solved]
by Timi · in Technical Issues · 11/09/2010 (11:39 pm) · 3 replies
There seems to be something wrong with comparing an object's class via code in Torque 2D. It returns true every time.
Within a collision I have this:
This will output:
Within a collision I have this:
echo (%object.class);
if (%object.class == "goodClass") {
echo ("This is a good class!");
}This will output:
badClass This is a good class!Which of course is not true at all. Am I doing something wrong?
Torque 3D Owner Aun Taraseina
if (%object.class $= "goodClass") { echo ("This is a good class!"); }