ID:159202
 
How can i delete an object on the HUD?

Say, if there's a GM thing that only GMs can use, what if i strip someone of their 'Temp' powers, how can i delete their HUD?
for( (whatever you are looking for) in X.client.screen)
Either del(item) or X.client.screen -= Item
In response to GhostAnime
GM.dm:113:error:O:undefined type: O
GM.dm:114:error:O:undefined type: O
GM.dm:115:error:O:undefined type: O
GM.dm:113:O :warning: variable defined but not used


That's what happened. No, the indentation isn't inconsistent, and i've named the object "O".
In response to NeonJ
1) This isn't a BB Forum, use <DM></DM> tags
2) It would be extremely helpful if you showed the snippet you used. We're not psychic y'know.
In response to GhostAnime
1 - I did. Before you responded.
2 - Don't worry, i managed to fix it. I think. :D
Depends on how your HUD is put together.

If it's with client.images, you'll need to have some kind of reference variables established to remove the appropriate elements - if not, you've little choice but to redraw everything in there from scratch, this time without the GM elements.

If it's with client.screen, you'll want to do as GhostAnime suggested: use a for list to go through each object in client.screen and remove the ones that offend.

If it's with special skin controls (e.g. the hud might be a special pane only visible to GMs) then you'll want to make sure that only the appropriate skin calls are run.