obj
proc
Building()
var/O = "/obj/Building_Items/[usr.InHand]"
if(!usr.InHand)
usr.alert("You must have something equipped to build!")
return 0
else
if(src.Amount >= 1)
new src(usr.loc)
src.Amount -= 1
return 1
else
usr.contents -= src
obj
HUD
BuildButton
icon = 'HUD.dmi'
icon_state = "Build"
New()
screen_loc="1,5"
usr.client.screen+=src
Click()
//var/O = usr.InHand
Building()
obj
verb
Equip()
if(!usr.InHand)
usr.InHand = src.name
alert("Equipped [usr.InHand]")
else
alert("You have something equipped already.")
obj
Building_Items
var/Owner
WoodWall
icon= 'Objs.dmi'
icon_state = "WoodWall"
Amount = 1
Problem description:
Ok so pretty much I have a proc in which I am trying to call from clicking a screen object. Only one thing when you click the screen object it builds what you have equipped on in your hand(InHand var). Then it needs to remove 1 off the Amount variable set for objects. The only problem is I can not find any way to !null the variable Amount. Everytime I call it, it cannot be read.
Edit: Also, the thing doing the proc is the building button, which presumably has no amount