ID:174052
Oct 7 2003, 7:41 am
|
|
I'm trying to make a "camera" system where you can build a camera, then build a console and view what the camera "sees" by selecting which one to view from a list. I messed around with client.eye, but either I'm completely missing what I'm supposed to be doing with it or I'm messing with the wrong var. Would anyone be so nice as to help me out?
|
Oct 7 2003, 7:56 am
|
|
I cant help you out, but others cant either post your coding so other can determine what is wrong
|
In response to Nagash
|
|
obj
Console icon_state = "console" verb View() set src in oview(1) for(var/obj/Camera/C in world) if(C.owner == usr.key) usr.client.eye = C.loc sleep(100) usr.client.eye = usr When it changes the player's client.eye, all it does is show a map full of nilspace, but it returns the view to its original, functional order again afterwards. |
In response to Enigmaster2002
|
|
right now It cycles through all the cameras that the players owns, meaning that the only one they can watch is the last one, I suggest Making a list and using an Input command so they can choose which one to watch.
|
In response to DarkCampainger
|
|
yeah are you making sure you actually own them? Like in theyre new() function settin whoever accessed that new function for them to be the owner? Like a verb to make one. Say var/obj/newcam = new/obj/cam then newcam.owner = usr. So your sure you own it. Also before you start loopin thru the world for cams test it with just one first and go from there. Once it works in every concievable way with just the one cam then move on to multiple ones
|
In response to Enigmaster2002
|
|
obj
Console icon_state = "console" verb View() set src in oview(1) var/list/Cameras Cameras=list("Cancel") for(var/obj/Cameras/C in world) if(C.owner == usr.key) Camera+=C var/obj/Camera/Pick Pick=input("Choose A Camera","Choose")in Cameras if(Pick="Cancel")return usr.client.eye = C.loc sleep(100) usr.client.eye = usr |
In response to Aridale
|
|
Hm, I messed around with it a bit, and with help from Franquiboy, I got as far as I have, but I discovered something odd about the whole system. If the console is built in view of the camera the player wants to view, it works just peachy. But if not, the player's client.eye is set to nilspace.
Console |
In response to Enigmaster2002
|
|
I kept messing around with the cameras, I built one and built a console some ways away from it, then when I chose to view the camera, it set my client.eye var to nilspace, but if I were to run toward the camera and get within view of it, client.eye is fixed on the camera as it should be.
Console |
In response to Enigmaster2002
|
|
You need to use client.perspective. I'm in a little bit of a hurry however so you'll have to look it up in the reference.
|
In response to DarkView
|
|
YES! Thank you DarkView! It finally works!
|