This code is listed under: mob/npc
Item is sold can create and placed into the usr.contents. All of this works fine. The only problem now is, since I added weight into my game I need to be able to get the item being sold's IW=item weight (obj/item.iw) and pass it to the WCheckA which will find the items iw value and then add it to the player's weight. Right now when you buy a beer it just gives it to you as before but no weight increase. Everything else works fine, -= if you drink it, it -= if you drop it, and it even += if you pick it up, but all those verbs are listed under the obj/s themselves.
LJR
Code:
new/obj/drinks/beer(usr)
var/obj/O = usr.contents
O.WCheckA(O.iw)
ID:149855
![]() Feb 6 2002, 5:26 am
|
|
![]() Feb 6 2002, 5:31 am
|
|
Check out the reference entry for the Entered() proc and look at the example. It shows an interesting way to use mob/Entered() for a system like the one you are working on.
|
Shadowdarke wrote:
Check out the reference entry for the Entered() proc and look at the example. It shows an interesting way to use mob/Entered() for a system like the one you are working on. Nice, but I've already got this much working. I need to be able to get that IW's var passed so its added. I think I read an error in my code where it said iw was null. LJR |
LordJR wrote:
new/obj/drinks/beer(usr) Each of those lines worries me:
|