Re-initializing a GUI?
by MoCubed · in Torque Game Builder · 05/23/2010 (10:53 am) · 1 replies
This isn't a difficult question, per-se, but I have several Gui's in my game that need to be set back to their original state after information has changed on them. For example, the player's health has gone all the way down to zero, so when the stage is restarted, I want the bar representing their HP to be full again. The way I do this right now is to re-execute the GUI file [exec(...)] while the stage is loading.
This hasn't caused any problems so far, but I see it could become one in the future.
My question is is this solution creating a memory leak? I'm not explicitly deleting the GUI object before re-executing, and the object IDs are increasing dramatically over the course of gameplay. I am still developing, so I don't know how long I'd have to test to prove it myself. Does anyone have any ideas?
Thank you in advance for your help.
This hasn't caused any problems so far, but I see it could become one in the future.
My question is is this solution creating a memory leak? I'm not explicitly deleting the GUI object before re-executing, and the object IDs are increasing dramatically over the course of gameplay. I am still developing, so I don't know how long I'd have to test to prove it myself. Does anyone have any ideas?
Thank you in advance for your help.
About the author
Check out our website: www.bakamostudios.com
Torque Owner Kevin James