I have screen objects that are created within my game, but my problem is that i cannot manage to remove them when needed.
Here's an example of what I am doing:
verb
add_hud()
usr.client.screen += new/obj/black
remove_hud()
usr.client.screen -= /obj/black
This isn't the code I want to implement what I am trying to do, but it is a simpler version.
The add_hud() works, and adds an onscreen object at a location i have specified.
The remove_hud() does not work. I'm assuming I'm using the code incorrectly, and if so, it's only because I am still learning.
I have tried looking through the forums and in Dream Maker's built in help, but to no avail.
What am i doing wrong?
Balt
If you want to remove /obj/black from your screen, you need to get the /obj/black object and remove it. Which you can either do by locating it (locate()), or storing the reference ahead of time.