ID:166723
 
Hey im making a game yea and im trying to find out how to make the game find out if a person is at the other side for exaple im standing near a panel and there is another panel i want to click activate and it can only activate is the other player is at the other side what code can make me find out if the other player is there or not and if hes not there it will say there has to be a player for the other panel to activate. HELP!!!
var/active_one=0
var/active_two=0

obj/panel_one
icon='panel1.dmi'
verb
Activate_Panel()
set src in view(1)
active_one=1
if(active_one==1 && active_two==1)
world<<"omg both active"
check()
proc
if(mob/M in view(1))
active_one=1
check()
else
active_one=0

obj/panel_two
icon='panel2.dmi'
verb
Activate_Panel()
set src in view(1)
active_two=1
if(active_one==1 && active_two==1)
world<<"omg both active"
check()
proc
if(mob/M in view(1))
active_two=1
check()
else
active_two=0