ID:147677
 
How would I add this to the client.screen without garbeling the text? This doesnt set the locs of the states right. would anyone be able to suggest something?
mob
testmob1
Click()
usr.target=src
var/list/textlist=list()
var/Loc=-(lentext(src.name)*1+1/2)
for(var/a=1, a<lentext(src.name)+1, a++)
letters+=copytext(src.name,a,a+1)
for(var/state in letters)
var/obj/text2/T=new(locate(usr.client.screen))
T.layer=FLY_LAYER+1
T.icon_state=state
T.pixel_x=Loc
T.pixel_y=10
Loc+=6+1/2


x, y, and z values are whole numbers(integers). You can't display something at (1.43, 45.2, 8.6). What you can do, however, is offset the location they're displayed at using pixel_x and pixel_y. 16 pixels would be half a turf.
In response to Jon88
Jon88 wrote:
x, y, and z values are whole numbers(integers). You can't display something at (1.43, 45.2, 8.6). What you can do, however, is offset the location they're displayed at using pixel_x and pixel_y. 16 pixels would be half a turf.

Correction: Screen objects don't use pixel_x/y. They use the colon format:
screen_loc = "1:12,4:-5"
That displays with the equivalent of pixel_x=12, pixel_y=-5.

Lummox JR
In response to Jon88
Not the problem, I need it on client screen, have it working fine on regular map.
In response to Valderalg
Valderalg wrote:
Not the problem, I need it on client screen, have it working fine on regular map.

In that case your problem is that you haven't been setting screen_loc at all.

Lummox JR
In response to Lummox JR
Nm sorry my bad
In response to Lummox JR
Lummox JR wrote:

Correction: Screen objects don't use pixel_x/y. They use the colon format:
screen_loc = "1:12,4:-5"
That displays with the equivalent of pixel_x=12, pixel_y=-5.


AAARRRGGGHHH!!!

You have no idea how many fancy tricks I have had to implement to get around the fact that I never read all the way to the bottom of the screen_loc reference entry. I always just assumed there was no support for screen object pixel offsets since pixel_x/pixel_y didn't work.

Yeah, yeah, I know. Thats what I get for assuming.
In response to Flick
Remember, when you're assuming, you make an ass out of u and Ming... and Ming is merciless