ID:272613
 
i wanted to know how to make a new item drop when i Click Drop Gold, like

mob
verb
Drop_Gold(n as num)
if(usr.gold>=n)
usr.gold-=n
(how do i make the gold drop?)
obj/gold
var/amount = 0
New(loc, setAmount)
amount = setAmount

mob
verb
Drop_Gold(n as num)
if(usr.gold>=n)
usr.gold-=n
new /obj/gold (loc, n)
What you want is to create a new gold obj at the player's location. It is done through the new() proc (and using the loc var in it). You'd also want to set a property (var) on the new gold object containing the amount of gold in it, since the player can be discarding any amount of gold in one drop and as such.