Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 3    [LBP3] Help!!
#1

How to prevent Sackboy from automatically changing layers?

Archive: 7 posts


I'm making a level where Sackboy is able to fall through floors. There are some areas where there is a layer directly in front of Sackboy that's slightly lower because aesthetically, it just looks better. However, whenever Sackboy attempts to fall through the floor in the back, he changes layers to the one in front of it. Is there a way I can make it so that Sackboy just falls straight through without him automatically changing layers in those particular spots, or am I just going to have to come up with a different design?

Edit - Okay, so it seems that part of the problem is that Sackboy isn't able to fall through the floor completely? He's kind of stuck inside the floor. Not sure how to make it so that he simply falls smoothly through the floor.

Sackboy's logic is set up so that when you press L1, it activates a switch, and that switch causes the wall or floor to lose its collision. Walls work perfectly. I tried adjusting his weight to make him heavier. Seemed to work at first, but after a couple of tries, he kept getting stuck again.
2014-12-13 03:57:00

Author:
Remy
Posts: 252


Put some invisible solid material or plasmafied holo/sticker panel in front of the hole. That will prevent him changing layers.2014-12-13 05:15:00

Author:
Dr C
Posts: 122


Turns out the layer changing isn't the only problem. He gets stuck inside the floor and doesn't travel all the way through (see the edit in my first post). I don't know why he doesn't go through in spite of the floor losing collisions when pressing L1. It works with tags. There is a tag that activates when Sackboy presses L1, and that triggers the tag sensor on the floor. He should fall right through, but he doesn't and either changes layers or gets squished. I'll try to make a video of it to show what's going on.2014-12-13 05:41:00

Author:
Remy
Posts: 252


Offhand it sounds like the floor isn't losing collisions for long enough. That would get him stuck or squished.2014-12-13 05:47:00

Author:
Dr C
Posts: 122


You would need to use logic to make it to where it activates when the player presses L1, but the collision will always stay off until the thing he is going through no longer is colliding/touching Sackboy.

This can be done with a collision sensor, and holo. You do this since collisions are off while he is falling through, so the ground he is going through cannot detect that he is in the floor.

Try testing the walls again, and instead of going all the way through, stop moving through, half-way, and see if he is squished in the same way.
2014-12-13 06:42:00

Author:
Devious_Oatmeal
Posts: 1799


Are you sure the switch is staying on long enough?

Also, when it comes to the layer changing, under the creatures and characters section of your tools, there's a tool called gameplay tweaker. One of the options within this tweaker allows you to disable automatic layer changing. You can easily incorporate it into your sack person's logic with a tag sensor and then place a corresponding tag in areas where you don't want him to change layers. Might help in the future.
2014-12-13 10:09:00

Author:
olly_nova
Posts: 31


The way it works is as long as you are holding L1, the switch *should* be activated. When he gets stuck in the floor, I am able to change layers inside the floor, and that causes him to drop down...at least in some areas. I can't expect people playing my level to know to do that unless I'm like "by the way...", but even then it wouldn't be that fluid.

I'll try to find a way to keep collisions off for longer and see if that works. I'll put it on a timer since I don't want it to be permanent. While moving through the walls, if I stop, I end up being pushed out anyway, so the walls are okay.

I appreciate the help! I'll try everything out asap!

Edit - olly_nova, the Gameplay Tweaker worked!! I've never used those before, and I couldn't remember what any tutorial said about them. I figured there had to be something! Thanks a lot! Now my Sackboy falls through the floor with no problem at all!

I guess it was a layer changing issue after all. I attached the Gameplay Tweaker to the Tag Sensor, and voila. Works like a dream, and it was truly a simple fix even though I had no clue what to look for. Now I can finish this puppy up. Thanks again for your help, everybody!!
2014-12-13 14:03:00

Author:
Remy
Posts: 252


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.