PDA

View Full Version : Created object goes into the wrong sim's inventory


Gwenke33
14th Mar 2011, 12:47 AM
I'm working on a beehive, an old object from PCSims. It's been tweaked by XPTL and then by me, but the problem is actually with the original coding (I've tested and the same thing happens in the unmodified object as well).
When sims "take honey into inventory", the group meal that is produced gets put into another sim's inventory. In my testing, it always went to the same one sim (in the household), no matter who took the honey.
So I believe the "Sub - Take honey into inventory" BHAV needs to be looked into (last 6 lines) at least for a start - but I don't know enough to go further.
If possible, I would be happy if the group meal went to the business owner on owned busines lots (the way the honey pot does), but I'll be happy if it just goes to the inventory of the active sim.
Thank you.

Echo
14th Mar 2011, 04:30 AM
Yep, basically that's looping through all the sims in order of neighbour ID, then choosing the the first one it finds who is part of the family.

I'd try this:
Change line 0x13 to [prim 0x0002] Expression (Stack Object ID 0x0000 := My 0x000B (object id))
"Pescado's Delete" lines 0x14 through 0x16

That should make it go into the current sim's inventory. :)

Gwenke33
14th Mar 2011, 04:35 AM
Thank you, I'll try that.

*Edit: Thank you again, Echo, you're a lifesaver. It works now.

Echo
15th Mar 2011, 12:59 PM
Glad to help. :)