Want to talk about modding the game or got a question about it that isn't Body Shop or Object Creation related? Post here. All other types should go to the respective sections.
Note: If you have a question about modding objects or bodyshop, please see the relevant forums in the Create section.
I'm currently making an object that uses slots. I have gotten the routing slot to work fine, but I can't get my container slot to work fine as well. When testing the object out with testingcheats enabled, I get an 'Undefined Transition' error right before the sim should snap into the container slot.
I think this might have to do with there being an animation right before snapping into the slot, since every time I get that error I need to adjust the animations for the object. But I don't think it's the animation alone, since I took out the reference to the container slot and the object worked fine (except the sim wasn't in the right place).
I think that the parameters I used in the primitive are causing this, since I'm not sure how to set them up correctly.
I've uploaded the package file for you to look at.
Well, about the slot number in stack param thing, the slot number is 0x00, so I guess it's already there, but 'invisible' because of it's number. And about the 'ask person to move' thing, I don't see that anywhere in the BHAV editor.
I decided to mess around with the parameters a little, and most of the combinations I tried didn't work, but one came up with a different error. This time it was 'could not find object referance'. This seems to be more of a side-step than an improvement, but I'm going to go ahead and attach the new file incase anyone can find what's wrong with this one.
I wasn't able to fix the whole problem, but I've certainly learned a lot about slots in the last few hours! It actually runs through most of the sequence now, but I've run out of time to finish it (whoops!). Here's a couple of notes anyway:
- The "undefined transition" error is telling you that the BHAV failed (ie - it returned false) and you didn't have any alternative path. Obviously, the line that returned False shouldn't have (Snap Into). As you said, skipping this line causes the animation to run correctly.
- Container slots that can contain whole sims have to have an i7 value of '7'. Yours was set to 5, which I believe means "placeable on sims" (plates, accessories etc). The values for i7 are the same as in object intersection flags, see here: http://www.modthesims2.com/showthread.php?t=82685
- The parameters you had for each of the snap commands are pointing to the wrong objects. In the case of the first one, the object you wanted to snap the sim into was the stack object. In the second one, you wanted to snap the sim back to the routing slot. In both cases, you were actually referencing [param 0], which is mostly not the object you want.
- I changed the support strength in the init to something more closely resembling a sim-containing object
It's still broken, but I've got to head off now and something is better than nothing! At least it's a bit closer now!
I have been trying to write a BHAV to snap an object into a container slot and make it fade in (making a vase appear on the easel - yes it sounds stupid but I had a project in mind) and ran into the same two errors as poifectly poiple. At first I used the settings of the easel BHAV "create canvas" and since this did not work I have been playing around with the snapinto parameter settings, but it simply does not work (by now I have reached a point where I donīt get an error message anymore, but the BHAV simply is stopped at this point without the object appearing).
Is there some kind of tutorial that could help me to understand this problem better - something which kind of container slots are suitable for which actions (like echoīs information on the I7 value) and what kind of parameter settings should be used correctly with "snapinto"?
I am very much longing to understand this matter from the ground up to be less dependent on the try and error method (which in this case was not even successful)!
The best advice though, is to copy from an item which already behaves in that sort of way. If you're trying to create a new object then fade it in in a particular slot, then I'd suggest you check out the code/slots in the cauldron from the Harry Potter thread - It creates potions in a slot copied from an end table.
If you ever get the details on the other parameters please let me know. I am trying to make a dresser that doubles as a surface and so far I haven't had any luck. I've added slots to a slot file, given unique instance numbers to the new slot files. Made sure I numbered them and linked them to the Bones thing in the text STR. Made sure I added the slots to the CRES. From what I can see of the Grand Trianon dresser/mirror (which functions as a surface) there doesn't seem to be anything in the bhavs to make it function as a surface but for some reason I can't seem to get it to work for my dresser. I submitted it to the object creation workshop repair thread.
I'm confused about some of the differences in the settings between things in the end table, coffee table, and the grand trianon dresser in terms of the slot files.
I'm hoping that the parameters I don't understand are what are causing the problem and that once I know what they all do I can get it to work.