Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 1st May 2010 at 12:47 AM
Manage Inventory - how?
Hello

I made an object, but I want only sims with -for example- 7x "mystic dust" (Guid: 0x54D1CBBA) in their Inventory can use it.
And if a sim use it, I want to delete "mystic dust" (7x) in their inventory..


How can I do this??

(sorry for my English!)
Advertisement
Retired Duck
retired moderator
#2 Old 1st May 2010 at 2:34 AM
Hi Kiwi,

MSD asked a very similar question a few days ago: http://modthesims.info/showthread.php?t=399819
It would take a fair amount of BHAV editing, is that something you're comfortable with?
Test Subject
Original Poster
#3 Old 1st May 2010 at 1:50 PM
Hello

I tried it, but it doens't work
sreenshot:
http://img144.imageshack.us/img144/9226/tokenw.jpg

edit: and I don't know what "index" is?
Retired Duck
retired moderator
#4 Old 2nd May 2010 at 2:10 AM
Index refers to what piece of data you are trying to read from the token. Can you attach your error log here?
Test Subject
Original Poster
#5 Old 2nd May 2010 at 2:15 AM
Quote: Originally posted by Echo
Index refers to what piece of data you are trying to read from the token. Can you attach your error log here?

no error..
But ALL sims (with or without the required item) can use the object...
Retired Duck
retired moderator
#6 Old 2nd May 2010 at 2:34 AM
Have you connected the guard BHAV to the correct line in your pie menu functions?
Test Subject
Original Poster
#7 Old 2nd May 2010 at 3:47 AM
Quote: Originally posted by Echo
Have you connected the guard BHAV to the correct line in your pie menu functions?

yes, in "CT - Object Menu" (it's a global sim object)
Retired Duck
retired moderator
#8 Old 2nd May 2010 at 7:07 AM
Oh, this is a social plugin object? Make sure when you test changes to your object, you don't save. If you've saved a lot after you've had the object spawned, it won't spawn again and it probably won't refresh your code changes.

Try it on a brand new, empty lot, and don't save your game after you've tested it. If it still doesn't work I might need you to post your package, because from what I can see in your code screen shot it looks correct.
Test Subject
Original Poster
#9 Old 2nd May 2010 at 2:24 PM
Thank you!!! It works now

EDIT: But how can I delete (for example 5x) an item?
Retired Duck
retired moderator
#10 Old 4th May 2010 at 1:21 PM
You need to loop through those tokens again, but this time run "Manage Inventory (Remove Token At Index)".
Test Subject
Original Poster
#11 Old 4th May 2010 at 5:28 PM
Quote: Originally posted by Echo
You need to loop through those tokens again, but this time run "Manage Inventory (Remove Token At Index)".

thanks! like this?:
http://img100.imageshack.us/img100/7938/token2a.jpg
Retired Duck
retired moderator
#12 Old 5th May 2010 at 12:57 AM
Something like that, yep.
Sockpuppet
#13 Old 15th May 2010 at 3:06 PM
Is there a tutorial or a thread which explain how to handle the inventory ?
Retired Duck
retired moderator
#14 Old 16th May 2010 at 2:19 AM
Quote: Originally posted by Kabuto
Is there a tutorial or a thread which explain how to handle the inventory ?
Not really, no. There are a few global functions with very self explanatory names to do specific things, but pretty much everything else is just the "Manage Inventory" primitive. There are quite a few objects about which you can copy from though.

Did you have a particular question in mind?
Sockpuppet
#15 Old 16th May 2010 at 3:22 AM
I think about put an invisible object (controller ?) in the inventory and add a pie menu to the sim.

Or a visible object which run a function when the player remove it from the inventory.
Back to top