Not walk under furni

Dec 17, 2017
151
19
Hi Devbest,

I would like that when I put a fury on top of another or stack the furni there is a chance to pass under.
Example:


On my server it is not possible to walk under the furni.
Thanks :)

It has nothing to do with the is_walkable or stack
 

JayC

Always Learning
Aug 8, 2013
5,504
1,401
On no server is it possible to walk under a furni.

I will tell you that this would be possible to code, but could slow down / lagg walking
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,504
1,401
If you REALLY want to be able to walk under furni when its stacked here is basically what you would need to do:

Find where walking gets handled, and where it discovers that there is furni on the tile that is too high up for you to walk on, or the top furni is not walkable. You will need to add an IF statement and then in the code build what the tile looks like. So find the first item in the stack (lets say the bottom-most item has a stack height of 0.5) so you know the tile sits at 0.0 and the item sits at 0.5. There is enough space to fit a Z-Shelf.
Now, to allow users to walk under the tile you would need to find the exact height of the user (You can just get close so it looks right in game, probably somewhere around 4) and you need to make sure there is nothing between 0.0 and 4.0.

Now lets say there is an item at 0, but its walkable with a stack height of 0.5, then you would need to check the space between 0.5 and 4.5 for a full clearance of 4.0.

This process will take time, and could bog down walking animations and cause a few milliseconds of processing time.

The other issue you may encounter is handling when the room has a 'refresh' (Like when you are standing in a seat, but someone drops something or your avatar changes and sits down). This room refresh you will need to force your user back into the walking underneath, and not glitch them to the top of the furni stack.


You can just achieve this by using optical illusion stacking, without all the unnecessary code.
 

Users who are viewing this thread

Top