I was designing a GPS system so people could use it to see whats around them like monsters or the landscape.
Well how I do it is I have an item icon that you get and then you use that to start it and a screen pops up and on that little screen there are dots that show where stuff is.
Now I was able to get the screen to hold the dots but I cant get the screen to appear on the top left of the screen and move when I move. Now first thing I tryed was North() procs it worked but they way to slow then I tryed Animation_movement var but it just stays there maybe if some one would tell me how to use that I could use that.
But with that not working I went on to the screen vars and used screen_loc but what happenes is I have my usr:GPSscreen which is the screen but when I add it to the usr.client.screen+=usr:GPSscreen it like makes a copy of it and paste it to the screen so I cant edit the one on the screen inless I do the usr:GPSscreen:overlayers+=playerdot and then add it back to the screen with the other code. But then I dont know how to delete the all ready made dots on the screen.
So now Im stumped! The answer is could someone please tell me how I could add the usr:GPSscreen to the client.screen without making a copy of it or please tell me how to use the animation_movement var.
Thanks thats all tell me if you need to see any of my code.
ID:261550
Jul 1 2002, 7:13 am
|
|
In response to Lummox JR
|
|
Lummox JR wrote:
A lot of that was really difficult to follow. Why, exactly, do you have to make a copy of the icon to add it to client.screen?It doesnt thats just what happenes when I try and add the icon to client.screen. Is usr actually appropriate here--i.e., are you using this in a verb? Why are you using the : operator? Your code would probably help--at least the code that creates the icon (that is, draws it), creates the obj to display it, and adds it to client.screen. This verb is in the /obj/GPS/item which is what you pick up. start_GPS() usr:GPSscreen=new /obj/GPS/screen(locate(usr.x-6,usr.y+6,usr.z)) usr:GPSscreen:Update() This is the Update proc that is in the /obj/GPS/screen which is how I draw the things onto the screen obj. Update() for(var/mob/pc/M in view(30)) player = new /obj/GPS/player(usr:GPSscreen:loc) player:pixel_x=M.x player:pixel_y=M.y usr << "[player:pixel_x]|[player:pixel_y]" usr << "[M.x]|[M.y]" usr << "[usr:GPSscreen:x]|[usr:GPSscreen:y]" usr << "[M]" usr:GPScount+=1 usr << "[usr:GPScount]" for(var/obj/flowers/red/R in view(30)) src:flower = new/obj/GPS/flower(usr:GPSscreen:loc) src:flower:pixel_x=R.x src:flower:pixel_y=R.y As you can see I use the pixel_x,and y vars to get the location I plan on changing this to make it more afficiant for what I am going to use it for GPS system. The fallowing is the player and flower types in the GPS obj. player icon_state="player" layer=MOB_LAYER+2 animate_movement=3 flower icon_state="flower" layer=MOB_LAYER+1 animate_movement=3 These are what make the dots or the gfx on the screen. |
Your code would probably help--at least the code that creates the icon (that is, draws it), creates the obj to display it, and adds it to client.screen.
Lummox JR