ID:164044
 
How would I add something to the usr's contents after the player like cuts down a tree. It would add logs to the inventory. How do I do that?
Pretty simple, something like this should work, unless I'm not understanding what you want.

obj/wood
icon = 'wood.dmi'

turf/tree
icon = 'tree.dmi'
verb/CutDown()
usr.GiveWood()

mob
proc/GiveWood()
src << "You get some wood!"
new/obj/wood(src)

In response to Foomer
That is a good example, but what I mean it (the wood) is added to the inventory (like picking up something). If the player cut down the tree, it adds a new obj (the logs) to the usr.contents.

Sorry for being not so clear....
In response to DadGun
DadGun wrote:
If the player cut down the tree, it adds a new obj (the logs) to the usr.contents.


Which is what Foomer's example does.

new/obj/wood(src)


Creates a new obj of type obj/wood, and places it in the src's contents (which is the mob who used the cut verb).
In response to DadGun
I'm trying to figure this out too but for now ive just been puting an object under the tree and made a new getwood verb were the player has to be on top of the obj to pick it up therefore once you cut the tree you can stand on top of the object and pick up the wood. It also looks nice because it seems as if you cut the tree and the wood is on the floor than just like in real life you would have to pick it up.
In response to Zagreus
Sorry, I didn't understand completely...
Thanks!