Author Topic: Quick question re: inventory  (Read 3169 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim C

Quick question re: inventory
« on: November 28, 2003, 11:43:59 PM »
Is there any way to remove an item from your inventory (e.g., after you've used it)? Thanks.



Offline Doan Sephim

Re:Quick question re: inventory
« Reply #1 on: November 29, 2003, 12:19:50 AM »
hey jim,

it's alot like this:

(if(Said('drop/key'))
    (if(send gEgo:has(INV_KEY))
            Print("OK")
            (send gEgo:put(INV_KEY))
    )(else
            Print("That would be easier if you had one to drop.")
    )
)

it's the same as getting really...just use the word "put" to lose it.
doan

Offline Jim C

Re:Quick question re: inventory
« Reply #2 on: November 29, 2003, 11:01:33 AM »
Oh, ok. Thanks so much. I must have tried every possible word except for "put".

You're very helpful!

Offline Brian Provinciano

Re:Quick question re: inventory
« Reply #3 on: November 29, 2003, 01:31:35 PM »
The reason it's "put" to drop an item is because the "get" function puts the item into the ego's inventory. The "put" function puts it to have a different owner. It could be called as (send gEgo:put(INV_SOMETHING newOwner)) to put it under newOwner. If only one parameter is specified, it simply sets it's owner to -1.

The help file describes this and more about all the other methods/classes/etc.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.037 seconds with 21 queries.