ID:1580663
 
Keywords: hud
(See the best response by Crazah.)
Hi, All

I'm trying to get a image to loc on the top-right corner of my screen but I don't know where to find the tut. Help me out please ^_^
Best response
There's a DM reference page on this here. You'll need to set an atom's screen_loc to "NORTH,EAST" and add it to the client's screen.

There's also an additional entry on UI as well.
Where did i go wrong?

    obj
hudzz
screen_loc ="[x=client.x+1],[y=client.y+2]"
icon='health hud bar.dmi'
icon_state="empty"
/client doesn't have x and y variables. Second, the assignment operator doesn't return a value for use as an operand. Third, you have to use constant values in type variable definitions. Fourth, client as a variable doesn't exist outside of the context of a specific mob.

I assume you want the object to appear 1 to the right of the left of the client's screen, and 2 up from the bottom.

obj
hudzz
screen_loc = "2,3"


You also need to be aware you aren't creating an object, but defining an object prototype.

In order for this object to show up, it needs to be added to the client's screen in a relevant function, like so:

mob
player
Login()
. = ..()
client.screen += new/obj/hudzz()
Sigh* I've inserted the codes and it does appear at all. Am I missing something?
That's because you blindly copied and pasted. Those were just examples of what you needed to do. You need to adapt the examples to your specific setup.
thanks for the help