ID:158799
 
Well if been working on an equip systemy, but i cant seem to let it work good,



obj
Armorbody
Zaku2
icon = 'Armors/Zaku 2/Zaku II Body.dmi'
icon_state = "Up"
name = "Zaku II Body"
pixel_y=32
suffix = ""
cost=5000
verb
Equip()
if(!usr.Gundamin)
return
if(usr.body)
usr << "You already got an Body equiped"
if(worn)
var/image/I = image(icon,icon_state,50)
var/image/E = image(icon,"Down",50)
I.pixel_y = pixel_y
usr.overlays.Remove(I)
usr.overlays.Remove(E)
worn = 0
usr.body = 0
usr.defence -= 30
suffix = ""
usr << "You put back The [name]."
else
worn = 1
usr.body = 1
usr.defence += 30
var/image/I = image(icon,icon_state,50)
var/image/E = image(icon,"Down",50)
I.pixel_y = pixel_y
usr.overlays.Add(I)
usr.overlays.Add(E)
suffix = "Equiped"
usr << "You Equip [name]."




When i equip something i can still let something else equip over the body like the same equip again,
But how can i make it like
You can only equip 1 Equip of body?
When you check if you already have a body equipped, you don't stop the proc or anything. One way is to use else, another is to use return.
if(usr.body)
usr << //...
return //stop the proc

//or

if(usr.body) usr << //...
else
if(worn)
//...
else
//...
In response to Kaiochao
Thanks, Works already