ID:162026
 
Code:
obj
weapons
icon = 'weapons.dmi'
verb
Equip()
set src in usr
if(!usr.equipped)
src.verbs+=/obj/weapons/verb/Unequip
src.verbs-=/obj/weapons/verb/Equip
src.wequ=1
src.suffix+="Equipped"
usr.equipped = 1
usr.atkr += src.a
else
usr << "You already have something equipped in that slot!"
Unequip()
set src in usr
if(!usr.equipped)
usr << "You dont have anything equipped!"
else
src.verbs-=/obj/weapons/verb/Unequip
src.verbs+=/obj/weapons/verb/Equip
src.wequ=0
src.suffix =""
usr.equipped = 0
usr.atkr -= src.a

obj
edges
layer = MOB_LAYER+60
icon = 'edge.dmi'
weapon
icon_state = "weapon"
screen_loc = "12,1"
rangemax = 29
rangemin = 0
client
New()
if(src.key == "Guest")
del src
..()
src.screen += new/obj/edges/weapon


Problem description:
Well I am trying to make it so when you equip a weapon it adds to the edge/weapon slot and when you unequip it takes it away.
Also if it makes it any easier you could look at the game as to what I mean... Whenever somebody equips something i want that to add to a slot on the screen

MSN - [email protected]
In response to Nategrant
WOOT I DID MYSELF BOOYA!
    weapons
icon = 'weapons.dmi'
verb
Equip()
set src in usr
if(!usr.equipped)
src.verbs+=/obj/weapons/verb/Unequip
src.verbs-=/obj/weapons/verb/Equip
src.wequ=1
src.suffix+="Equipped"
usr.equipped = 1
usr.atkr += src.a
for(var/obj/weapons/O in usr)
if(O.wequ)
usr.client.screen += O
else
usr << "You already have something equipped in that slot!"
Unequip()
set src in usr
if(!usr.equipped)
usr << "You dont have anything equipped!"
else
for(var/obj/weapons/O in usr)
usr.client.screen -= O
src.verbs-=/obj/weapons/verb/Unequip
src.verbs+=/obj/weapons/verb/Equip
src.wequ=0
src.suffix =""
usr.equipped = 0
usr.atkr -= src.a

But if you see anything for further issues please post telling me what I did wrong.
In response to Nategrant
In response to Nategrant

Well done, but I don't like having the Unequip verb when items are not even equipped, so I took it away upon login for all objects that were not equipped.

for(var/obj/weapons/O in src)
if(O.equipped == 0)
O.verbs-=/obj/weapon/verb/Unequip




<^> Asha_LaPoe
Obekka Games
In response to Asha_LaPoe
That should be <code>if(!O.equipped)</code> .