Game Development Community

Is there a way to set a T2DStaticSprite to invisible in code?

by Brian · in Torque X 2D · 11/20/2008 (7:35 pm) · 1 replies

I have a component that just takes 2 T2DStaticSprites specified in some dropdowns in TXB (it already lets me specify the proper components). What I want to do is just hide one of them. I don't have TXPro so I'm just working off the binary. There doesn't seem to be a setvisible method on a T2DStaticSprite. I did see that there is a boolean for visible, but I'm thinking that this is just to find out if it's visible, not set it. Anyone know the proper method for setting visible to false?

#1
11/20/2008 (8:18 pm)
Nevermind. Figured it out... forgot to register for a tick using ProcessList.Instance.AddTickCallback(Owner, this); So my visibility toggles were never getting run. Hopefully someone else will find my stupid mistake useful.