ID:170569
 
Does anyone know how to make a Control panel that will let you take overthe view of the camera with a verb but you have to build the camera and build a control panel to do it?
Tsonic112 wrote:
Does anyone know how to make a Control panel that will let you take overthe view of the camera with a verb but you have to build the camera and build a control panel to do it?

You would use client.eye for that. I may be wrong; you r message was pretty unclear. On the developer forum you should be clear, informative, and specific. Also, good grammar and spelling makes you easier to understand.

Anyway, here's my interpretation of what your post:

mob/Player
var/list/cameras

verb
Build_Camera()
var/obj/Buildable/Camera/C=new/obj/Buildable/Camera(src)

Build_Control_Panel()
new/obj/Buildable/Control_Panel(src)

obj/Buildable

var/owner

proc
New(mob/Player/P as mob)
src.owner=P

Camera
icon='Camera.dmi'
New(mob/Player/P as mob)
..()
P.cameras+=src

Control_Panel
icon='Control Panel.dmi'
verb/View_Cameras()
set src in oview(1)
var
list/camList=list()
for(var/i,i<=usr.cameras.len,i++)
camList["Camera [i]"]=usr.cameras[i]
var/obj/Buildable/Camera/C=input(usr,"Which camera would you like to view?","Control Panel") as null|anything in camList
if(C)
usr.client.eye=locate(C)//Look at the camera
sleep(100)//After 10 seconds
usr.client.eye=usr//Reset client.eye