client
perspective=EDGE_PERSPECTIVE|EYE_PERSPECTIVE
show_popup_menus=1
MouseMove(object,location,control,params)
UpdateMouse(object,location,control,params)
proc/UpdateMouse(object,location,control,params)
var/par=params2list(params)
var/pos = par["screen-loc"]
if(!pos) return
var/comma = findtext(pos, ",")
var/colon = findtext(pos, ":")
if(comma < 1) return
if(colon < 1) return
var/tx = text2num(copytext(pos, 1, colon))
var/px = text2num(copytext(pos, colon + 1, comma))
colon = findtext(pos, ":", comma)
if(colon < 1) return
var/ty = text2num(copytext(pos, comma + 1, colon))
var/py = text2num(copytext(pos, colon + 1))
usr.Mouse.screen_loc = "[tx]:[px - 16],[ty]:[py - 16]"
Problem description:
Hallo, i try to make screen cursor fo 2 maps, and this is code. It's work but only if i use one(defualt map). My proble is, i use 2 maps and screen_loc format for 2nd is "Mapname:1,2". I know what is problem but i have no idea how to fix it... :(