/obj/screen/hand/l_hand
name="Left Hand"
icon='icon/interface.dmi'
icon_state="l_hand_inactive"
New(client/c)
screen_loc="3,1"
c.screen+=src
Click()
if(activehand=="Left")
return
if(activehand=="Right")
handchecker_icon()
/obj/screen/hand/r_hand
name="Right Hand"
icon='icon/interface.dmi'
icon_state="r_hand_inactive"
New(client/c)
screen_loc="2,1"
c.screen+=src
Click()
if(activehand=="Right")
return
if(activehand=="Left")
usr<<"test"
handchecker_icon()
return
/obj/screen/hand/proc/handchecker_icon()
var/obj/screen/hand/r = /obj/screen/hand/r_hand/
var/obj/screen/hand/l = /obj/screen/hand/l_hand/
if(activehand="Right")
r.icon_state="r_hand_active"
l.icon_state="l_hand_inactive"
return
if(activehand="Left")
r.icon_state="r_hand_inactive"
l.icon_state="l_hand_active"
return
the error
runtime error: Cannot modify /obj/screen/hand/r_hand.icon_state.
proc name: handchecker icon (/obj/screen/hand/proc/handchecker_icon)
usr: Salazar Neck Twister (/mob/human)
src: Left Hand (/obj/screen/hand/l_hand)
usr.loc: Magi Turf (6,10,1) (/turf/floors/Magi_Turf)
src.loc: null
call stack:
Left Hand (/obj/screen/hand/l_hand): handchecker icon()
Left Hand (/obj/screen/hand/l_hand): Click(null, "mapwindow.map", "icon-x=16;icon-y=19;left=1;scr...")
Problem description: So it is supose to change the selected hand, and it is supose to indicate that by changing icon_states from inactive to active. But when i try to switch hands, i get this error. Any ideas on what im doing wrong