ID:874947
 
(See the best response by LordAndrew.)
Are there any tutorials out there that explain what HUDs are and how to use them?

Huds are Heads up Display which are basically objects displayed on the screen. It is mostly really simple to use huds something like.

client.screen += object

also you need to set the objects screen_loc
So how would i make the X object close the whole thing
You would define the object and set its screen_loc.

obj
close
icon=''
screen_loc="5,10"
Click()
del(usr)

notice the click proc deletes the user.

now to add the object to the screen you do this

client.screen += new /obj/close


And that would be it.
No, I mean how would I make it close the HUD only.
Like delete the hud from the screen?

Add del(src) instead of del(usr) in the click proc I just showed you in my previous post
Okay thanks, but does that remove the every object I put or just the close?
just the close. if you want to delete every object use a for loop and go through client.screen and delete then that way.
So like this?:
obj
close
icon=''
screen_loc="5,10"
Click()
for(var/obj/O in client.screen)
del(O)
Ye I suppose.


EDIT :
You need to add usr in front of the client.screen since an object doesnt have a screen
Best response
SilkWizard's HUD demonostration is pretty helpful, I think. It shows how to create hubs that are also optimized not to bog down the world, and it includes a demonstration on drawing text on them.