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
Field Researcher
Original Poster
#1 Old 7th Jun 2006 at 12:11 PM Last edited by frillen : 27th Jun 2006 at 11:52 AM. Reason: Found a solution myself!
Default Creating stackable boxes(crates)?
UPDATE:
The answer was right in front of my nose
I simply cloned an end table, added a few behaviors so the end table could be placed on top of an end table, this way the object became stackable just like the Nightlife cubes, furthermore they can be used as end tables also, but if anyone has a different approach to making objects stackable then please feel free to post the idea here


Yes I'm trying to create stackable boxes(crates) to be used in a ware-house, I couldn't find the perfect object for it so I tried some of those who are stackable already, but there are downsides to them.
First I tried using the "Snowman construction set - Base" object (the bottom of the snowman, but went away from using this as my base since it's a bit too far from being a box and furthermore my boxes went floating in the air when stacking them.
I then tried using the "ClubCube by Luminescent Projects" object as my base, but had to give up on this too, since it added color fadings to my textured box and I don't know how to remove the animations.

The perfect box is an object which is close to being a box and doesn't have any interactions other than maybe 'view' and it should be stackable.

Does anybody know how to pull this off?
Maybe some information on how to make an object stackable and how to set the height of where the next object will be so it will appear that they are laying on top of each other?

Any help/info would be very much appreciated
:D

Life's a game, so let's play!
Advertisement
Field Researcher
Original Poster
#2 Old 27th Jun 2006 at 1:20 PM
For those who are interested, I've added a screenshot of the stackable objects.
At this moment the pallets have 10 color options included in the package, the barrels and the boxes have no color options included, I might add some if it doesn't affect the filesize too much.
These objects can be stacked, combined without limitations.
They can also work as end table since that's what they're cloned from!
I'll post more info once they're finished

http://upload.modthesims2.com/attac...id=322074&stc=1
Screenshots

Life's a game, so let's play!
Field Researcher
#3 Old 29th Jun 2006 at 12:31 PM
Thanks for the tip! And the meshes are excellent!

I do not do requests; please don't ask!
Scholar
#4 Old 29th Jun 2006 at 5:15 PM
can you upload that crate files i'd like to use them to make my crates stackable.
Field Researcher
Original Poster
#5 Old 30th Jun 2006 at 12:54 AM
Thanks for the feedback and I will upload the objects sometime next week(I'm going on a small vacation this saturday) :D

Life's a game, so let's play!
Scholar
#6 Old 2nd Jul 2006 at 1:51 PM
does anyone else know how to make stuff keep stacking on top of each other? i figured out how to make an object stack but it only stacks once.
Instructor
#7 Old 2nd Jul 2006 at 2:34 PM
Quote:
does anyone else know
Yup.
Modding InfoCenter - Changing the object Placement.
Scholar
#8 Old 3rd Jul 2006 at 8:42 AM
that didn't explain anything i want my object to be stacked on top of each other multiple times not just once. also that tutorial is out of date when i go into the editer and select MY it won't let me type anything in the next box like 0x0004 etc and i don't know what any of the names mean.
Instructor
#9 Old 3rd Jul 2006 at 12:15 PM
Quote:
that didn't explain anything
Perhaps you should think over that article a bit, not just look through it?
If an end table had flag 'Can place on end tables' set, and its weight is lesser than its support strength, it can be placed on itself. All the flags, and the weight/support strength stuff, are mentioned in the article.
Quote:
it won't let me type anything in the next box like 0x0004
Yup, instraction builder is upgraded since that article was written - now you should select the 'naming' of the flag. 0x04 is the 5th item in the drop-down list (because indexes start from 0).
If you're in doubt which flag to set, you can always look into init BHAVs of an object. For example, end table's Init calls semiglobal's Init, which calls global Init-Object, which has a line like the one which interests you:
[prim 0x0002] Expression (My 0x0004 (allowed height flags) Set Flag flag# Constant Value 0x0101:0x04 (Value: 0x0001))
So, 0x04 is 'allowed height flags' and, no surprise, end tables are by default placeable on floor only.
Scholar
#10 Old 3rd Jul 2006 at 12:22 PM Last edited by IgnorantBliss : 4th Jul 2006 at 4:43 AM. Reason: edited to combine posts
i dont know what any of that means this is far too complicated for me to follow.

it would be great if someone could make a bhav to make stuff keep stacking than post it here i could simply import the bhav than.
Field Researcher
Original Poster
#11 Old 4th Jul 2006 at 12:32 AM
Quote: Originally posted by ToRnado
it would be great if someone could make a bhav to make stuff keep stacking than post it here i could simply import the bhav than.

What Jasana says makes perfect sense!
I'll try to simplify it a bit for you, let's say you've cloned an end table and replaced the mesh with your crate mesh then you would have to add these 2 lines to your Behavior Function: Function - Init

[prim 0x0002] Expression (My 0x001B := Literal 0x0000) (This will set the weight to zero)
You can also press the button " in your behavior function plugin view and enter this code for quick setting: 1B000000FF0503070000000000000000

[prim 0x0002] Expression (My 0x0004 Set Flag Literal 0x0008) (Allows it to be placed on an end table)
You can also press the button " in your behavior function plugin view and enter this code for quick setting: 04000800FF0903070000000000000000

Remember to set the True Target to the next line except for the last line, there you will have to set the true target to Return True

This actually all you need to do to make an end table stackable, off course you'll need to alter the Z-translation of the cres file to ensure that the next object will appear directly on top of it instead of perhaps floating over it(the height of your object)

I hope this wasn't too confusing or else you can wait and examine my stackable boxes once I've uploaded them

Life's a game, so let's play!
Scholar
#12 Old 4th Jul 2006 at 7:47 PM Last edited by ToRnado : 4th Jul 2006 at 7:59 PM.
success i got them to stack but only once. how do i make them stack multiple times?
Object(ive) Investigator
retired moderator
#13 Old 4th Jul 2006 at 9:50 PM
Quote: Originally posted by ToRnado
success i got them to stack but only once. how do i make them stack multiple times?
Same thing happened to me. I used the mission end table from OfB.

Please don't PM me with questions. Post them in the appropriate thread.
Field Researcher
Original Poster
#14 Old 5th Jul 2006 at 7:57 AM
You can only stack 2 at a time, what you do is...
Once 2 are stacked on top of each other, you grab them by picking the bottom one(those on top of it will follow) and put them on a single, again grab the new 3 stack by the bottom and put them on a single etc.
That's how you stack them up

Life's a game, so let's play!
Scholar
#15 Old 5th Jul 2006 at 1:29 PM
Quote: Originally posted by frillen
You can only stack 2 at a time, what you do is...
Once 2 are stacked on top of each other, you grab them by picking the bottom one(those on top of it will follow) and put them on a single, again grab the new 3 stack by the bottom and put them on a single etc.
That's how you stack them up


thanks got it
Scholar
#16 Old 6th Jul 2006 at 9:15 PM
is this the same code to use for everything? cos i tried using it on a decorative object but it wouldn't stack.
Object(ive) Investigator
retired moderator
#17 Old 6th Jul 2006 at 9:41 PM
Um..decorative objects tend to not have slots for holding items, like tables do.

Please don't PM me with questions. Post them in the appropriate thread.
Scholar
#18 Old 7th Jul 2006 at 12:18 AM
well they can be stacked cos the cube in NL is a deco object
Object(ive) Investigator
retired moderator
#19 Old 7th Jul 2006 at 2:16 AM
Right, and Maxis gave it a slot for holding items, namely other cubes. Try cloning it.

Please don't PM me with questions. Post them in the appropriate thread.
Scholar
#20 Old 7th Jul 2006 at 10:02 PM
if you clone the cube it no longer stacks. i need the code for decorative objects.
Part-time Hermit
#21 Old 7th Jul 2006 at 10:07 PM
The cube appears to be a self-referencing object. Maybe it's stackable again if you fix the GUID references in the BHAVs?
Back to top