- Home /
check guitexture
How to would i check a guitexture in a if then statement. I have been searching all over for this????for example:
var mouse:GUITexture;
if(mouse.enabled=true;){ print("test"); } }
How do i make this possible?
Answer by Peter G · May 10, 2010 at 10:04 PM
You made one tiny typo.
var mouse:GUITexture;
if(mouse.enabled == true) //should be == & remove the ; { print("test"); }
== is to check if two values are equal, and = is for assigning values. So you used = and you needed to use == to check if enabled is true.
You could also just say.
var mouse:GUITexture;
if(mouse.enabled) { print("test"); }
Answer by vdizzle · May 10, 2010 at 10:13 PM
thx alot..ive been stumped on that. very similary to actionscript.
Yes, if you like an answer, please vote it up and mark it as accepted. If you really want to say thanks, add a comment to their answer.