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!
Instructor
Original Poster
#1 Old 9th Feb 2017 at 9:55 PM Last edited by whoward69 : 10th Feb 2017 at 8:43 PM.
Default Cannot remove from inventory?
Is there an opposite of "CT - Can Be Placed In Inventory" that stops an item being removed from inventory? Or some way to stop an object being placed anywhere on a lot? I need to stop an item being left behind on an owned business lot. Not being able to remove it from inventory would be one way, being unable to put it down would be another.

Edit: Another option would be to detect a Sim leaving a lot (how?) and put the item back in their inventory as they leave.

Edit 2: A sub-question is "how do I detect an owned business / non-primary residence lot?"

Edit 3: May be able to use the "Placement" and "User Placement" guardian BHAVs in the object functions list Scratch that, the guardians don't get called

Edit 4: Ummmm ... the answer to edit 2 is "cannot drive home from" ... off to look in the CarGlobals ...

Any suggestions

TIA

W

Just call me William, definitely not Who-Ward
Advertisement
Instructor
Original Poster
#2 Old 10th Feb 2017 at 8:49 PM Last edited by whoward69 : 11th Feb 2017 at 11:21 AM.
Given that you can abandon the InTeen bio-clock on a business lot, I'm guessing the answer to this is "you can't". Well, if it's good enough for InTeen ...

Just going to add a bit to the manual "do NOT do this, it is stoooopid!"

Just call me William, definitely not Who-Ward
Scholar
#3 Old 11th Feb 2017 at 11:05 AM
Not a good idea copy inteen's faults into your own work.
1st. to detect a family member leaving a lot use the car semi-global (group 0x7F4EA230) 'Get In - Start' (instance 0x2072). Owned vehicles and taxis have different 'get in' interactions but they both use that code and since walking to/from a lot uses an invisible car they still use that op-code, it's the op-code that causes sims to dress properly before leaving. You can add a few lines to place the item back into a sim's inventory if it's laying around.
2nd. to detect if the lot is the sim's own business but not home first use the global 'Lot - Is Current Lot Home Lot?' (instance 0x0622) if you can. That op-code will enable it to work on any lot zoning so it'll be good with mods that allow sims to own a hotel or anything else but it'll require Apartment Life minimum. Alternatively check if the current lot is a community lot since by default that's the only type of lot apart from their own home that sims can run a business from. Then use the global 'Business - nID is Owner or Owner Family Member?' (instance 0x04DD) to detect if the sim is leaving their business.
I don't see your need to limit it to an owned business though, surely it could be more damaging to leave it on a lot that you couldn't go back to and pick it up.
Instructor
Original Poster
#4 Old 11th Feb 2017 at 11:21 AM Last edited by whoward69 : 12th Feb 2017 at 10:20 PM.
Quote: Originally posted by Chris Hatch
Not a good idea copy inteen's faults into your own work.

I've been trying to avoid them - hopefully I've succeeded (only borrowed ideas, not the actual code)

Quote: Originally posted by Chris Hatch
1st. to detect a family member leaving a lot use the car semi-global (group 0x7F4EA230) 'Get In - Start' (instance 0x2072).

Cheers, might never have found that.

Quote: Originally posted by Chris Hatch
2nd. to detect if the lot is the sim's own business but not home first use the global 'Lot - Is Current Lot Home Lot?' (instance 0x0622) if you can.

Found that and was trying to use it with the User Pickup/Placement guardian BHAVs, but testing shows they never get called.

Quote: Originally posted by Chris Hatch
require Apartment Life minimum.

Not a problem, as one of the JobDataGlobals I'm already overriding is only in Apt Life

Quote: Originally posted by Chris Hatch
I don't see your need to limit it to an owned business though

It seems to be the only "non-home" lot that you can take things out of your inventory - can't use the inventory on community lots or hobby lots (not tried secret socs, but then YAs can't have jobs normally). Suppose I should try hotels, but yes, the code to be really safe, should just check for departure from any non-home lot ... and now I have a way to check for that (many thanks ) I shall do so.

Many thanks

W

Edit: Well that was easy!

Just call me William, definitely not Who-Ward
Back to top