View Full Version : What makes an object an invalid container (slot and snap issue)?

24th Jul 2018, 4:44 PM
I'm working on one of my old projects and figured it'd be best to add a container slot to snap a Sim into it. The object started out as a clone of the immobile chimes (which uses painting globals), so logically it wasn't meant to hold a Sim. I added the container slot and edited the init to give it support strength of 900. The Sim happily snaps into the slot, but the line to snap the Sim back out of the slot always errors. I pointed the false line to a "Debug - snap failure" line and the popup gives a "container object invalid" message.

The code is fine, because I exported it into an object that was always meant to hold Sims and it worked perfectly. I have a habit of using this package as a base for other things because I've added lots of deco/routing slots and subsets to it over time, so if I could make it hold and release a Sim too, that'd be great.

Chris Hatch
25th Jul 2018, 3:47 PM
Try the global op-code (0x0127) Snap - Away (flip sim around) to get the sim out of the container, you will need to use it twice if you need to keep the sim facing the same direction.
If/when you do get it to work remember, it is better for your code to throw an error and reset the sim if the sim does not exit the container than to have a 'stuck sim'

25th Jul 2018, 9:10 PM
Worked great, thanks.