mob
New()
new/obj/my_obj
obj
my_obj
layer=MOB_LAYER+1
New(client/C)
var/loc1 = usr.y + 5
var/loc2 = usr.x + 4
var/loc3 = usr.y + 5
var/loc4 = usr.x - 4
screen_loc="[loc1],[loc2] to [loc3],[loc4]"
C.screen+=src
But that gives me these errors:
runtime error: Cannot read null.screen.
proc name: New (/obj/my_obj/New)
usr: the mob (/mob)
src: the my obj (/obj/my_obj)
call stack:
the my obj (/obj/my_obj): New(null)
the mob (/mob): New(the grass (3,14,1) (/turf/grass))
Can anyone tell me how to fix this?
thank you in advance
-Rcet
[edit]
You may want to develop a method of putting my_obj in a client's screen outside of my_obj.New() though.