Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Tutorials
#1
Sackbots: Moving Through Platforms
Archive: 4 posts
Ever want to have a platforming level where your Sackbot could drop through a platform? Or jump up through it? But you'd still want to be able to walk and do everything as normal on that platform, I'm sure. Well, after a bit of experimenting, I found a way, and that brings me to making my second LBP2 tutorial, this time with pictures and more explanations. So what could this possibly be used for? Tons of things, actually. The first game that comes to mind that uses this is Super Smash Brothers. And it's pretty common in old school platformers, too. Let's get to making it, shall we? First off you'll want to set up your floor and platform(s). You'll want tags for both, but they need to be different. I used Orange tags, one labeled Floor, the other labeled Platform. Creative, huh? I recommend making the platform just one small grid square thick. You can use any material you want, just remember to add an Anti-Gravity Tweaker set to 100% anti-gravity and 100% dampening if it's not white/dark matter, or attached to some. You'll want it to be a material a Sackbot can walk on, though. And now for that Sackbot. I won't cover setting up how to control it, since that's covered in much better depth in other tutorials. I made it so my Sackbot couldn't change layer, since that would mess up this logic to an extent. Beyond that, I also added an Anti-Gravity Tweaker to the bot set to 20%. Why? Because jumping onto the platform without going through it is tough with normal gravity physics, if you still want to be able to go underneath it. You can change the amount of anti-gravity to suit your needs. Here's the original method I posted: Now for the fun fun logic part. Let's get moving down through the platform working first. Here's a picture of what we're about to make: http://i228.photobucket.com/albums/ee227/SuddenEnigma/APhoto.jpg First, decide what command will activate dropping through the platform. For testing, I used Triangle. Hook it up to a pulse (a Counter set to 1 and connected to its own reset), and the pulse to an AND gate. The other part of the AND gate is an Impact Sensor that's set to require the Platform tag. And that AND gate goes to a Sequencer. The Sequencer is set up to Start Playing Forwards, at 0.5 seconds per stripe. The In/Out Movers are put at the beginning of a stripe, that would be one per stripe. I put the first one to Move In Once, and the second to Move Out Once. You could reverse that to make the Sackbot move in front of the platform instead of behind it, but I think going behind looks better. And there you go. Your Sackbot can now drop through a platform. But what about jumping through it? That makes things get a little more complicated. But, there's an effective means to that, too. First, we're going to need an "In The Air" logic. This means you've jumped, but haven't landed yet. Here's what it looks like: http://i228.photobucket.com/albums/ee227/SuddenEnigma/APhoto_3.jpg I used the X button for my jump, since that's the default anyway. That's the input to the microchip here. It goes to a Pulse, and that Pulse goes to a Counter with a maximum of 1. This counter is also the output of the microchip, and is the logic saying that you're in the air. You just need to reset it to say you've landed. The inputs for the AND gate are an Impact Sensor (Platform tag) and a Tag Sensor that detects the Platform Tag. With the Tag Sensor, you'll want it set to 180 degree radius, and upside-down. It needs to be able to detect that the Platform is below the Sackbot. Wire that AND Gate into the OR Gate, along with another Impact Sensor, this one being set to detect the Floor tag. There, that's done. I'll refer to it as "In The Air" from now on, though it's only used one more time in this tutorial. You may find other uses for it, just as I have. Time to make the meat and potatoes of moving upwards through the platform. This part was a little trickier, so pay attention. http://i228.photobucket.com/albums/ee227/SuddenEnigma/APhoto_1.jpg Let's start at what goes in that AND Gate, which has 3 inputs this time. First, is your In The Air logic. Second, is an Impact Sensor to detect the platform. Third is another 180 degree tag sensor for the Platform, this one being right side up to detect when the tag is above the Sackbot. And now that AND Gate is going into a few things, the most obvious being an In/Out Mover set to Move In Once. I also have a Timer set to Begin Count Up with a target time of 0.6 seconds. The Timer is connected to its own reset, as well as to the other In/Out Mover (Think it's set to Move Out Once? You're right, it is.) Be sure the Timer is at least 0.6 seconds, though. It won't work any lower. And now for the tricky part. You lose your upwards momentum when you impact the platform, so you need a work around. I found a Timer with a Mover works best. Set the the Timer as follows: 0.1s target Time, 0.1s Current Time, and Invert Output to Yes. Connect the AND Gate to the Timer's Reset and the Timer's Output to the Mover. For the mover, I set it to 0 Left/Right Speed, and 4 Up/Down Speed. The timer will be on for just 0.1 seconds this way, and will give that last little push to get your Sackbot onto the platform. Feel free to play with the Up/Down Speed setting to get the effect you want. And there, your Sackbot can now jump up through the platform! But, we're not quite done yet. We need to make a change to the logic for dropping through it. http://i228.photobucket.com/albums/ee227/SuddenEnigma/APhoto_2.jpg The only change is to add an input to the AND Gate for your drop-through logic. For that Input, we want an upside-down tag sensor for, you guessed it, the platform. And then you're done. I have taken pivottt's suggestion and found a method using hologram, which is easier and looks much better. Here's how to do that one. First thing you have to do is set up some hologram to follow the Sackbot. Since I already have my Controllinator set to do that on some holo, I just changed the shape of it. I made it with two small rectangles connected by a thin pieces of holo on the front of them. Here's a picture for you to reference: http://i228.photobucket.com/albums/ee227/SuddenEnigma/Controlinator.jpg See those microchips with the Impact Sensors and the Tags? Those are what determines when you come into contact with a platform. Both Impact Sensors are set to Include Touching Yes, and wired to one of those Green Tags. But, the top tag is labeled "Above" and the other labeled "Below". This transmits a signal to the bot that we'll be using later. In my previous method, I used an "In The Air" logic. Well, it would have more accurate to call it "Have Jumped", but in either case, I've simplified it. http://i228.photobucket.com/albums/ee227/SuddenEnigma/JumpSensor.jpg That's a Counter of one, with X going to its input. The reset is just an OR Gate with Impact Sensors set to detect the Floor and Platform tags. For working with bounce pads: Instead of the counter being activated by X alone, it would also get activated by an Impact Sensor requiring a tag, which is placed on a bounce pad. Or, you can have a manual bounce pad, and the tag wouldn't even be necessary. The problem with Bounce Pads is that the randomness of the Sackbot's bounce makes them somewhat unreliable in this situation. A lot would have to be changed, but with a bit of tinkering, making this work with bounce pads is feasible. Okay, and now to set up the actual logic, which has been made a lot easier this time. http://i228.photobucket.com/albums/ee227/SuddenEnigma/EndLogic.jpg This time, the logic is set up in two distinct sides, the blue side being to drop through the platform, and the red side to jump through it. Either one triggers the Sequencer, which is the same as the Sequencer used in my previous method; Two In/Out Movers set opposite each other, one on the first stripe, one on the second stripe, set to 0.5s per stripe. I used Down on the D-Pad as my Input for dropping through the platform this time, so I had to use a Directional Splitter's negative output. Hooked that up to a pulser, so that holding down doesn't make you keep dropping through platforms. You could remove the pulser if you wanted to, though. Wire it into an AND Gate, in my example, it's the blue one. The other input for the AND gate is the Tag Sensor for the Green "Below" Tag, which doesn't have to have a large detection radius, since the tag will always be close to the bot. Wire the AND Gate into the final OR Gate. And now for the right side, which is jumping up through the platform. All you really need is for the "Has Jumped" logic and the Tag Sensor, which detects the green "Above" Tag, wired into an AND gate, and that AND Gate goes into the final OR gate. Hook up that OR gate to the Sequencer to have it start playing forwards, and everything works. There are a couple downsides to this, though. For one, you can't use multiple layers for the stage itself. Also, you have to make sure behind the platform is free of obstacle that would prevent a Sackbot from moving there. And not to mention, with how thin the platform is, you can't decorate it much. But, if you use Sticker Panel or Hologram, you can make it look better, without losing any functionality. And lastly, this doesn't yet work with bouncepads, though I have been trying to trouble shoot that. And now to edit in a problem I just found. When using multiple platforms, the logic still works fine, but the issue is a platform directly over another. You have to make sure they're the proper distance apart vertically, otherwise you get stuck in the background. If the platforms are too close, you can't fall through. If they're too far, you can't jump through. With my example, of 20% anti-gravity and a 4.0 speed Mover, I found 4 Small Grid Squares to be the only one that works, though the jump is a bit odd looking. 3.5 Small Grid Square would have been better, but I prefer working with the grid as much as possible. You'll need to adjust your spacing through experimentation with the settings you choose. Feel free to leave some feedback. It'd be great to know if this has helped anyone. And don't forget to let me know if you find any problems, or just need some help. | 2012-02-03 13:06:00 Author: SuddenEnigma Posts: 70 |
Nice tutorial, even if I would try to place the things on the chips so it looks a bit more... organized ? Or as comphermc says, nice and tidy ^^ By the way, you hooked a pulser to a counter set to one. That's useless in here, you can just use one counter. I wouldn't use an impact to detect the player under a platform though. Also, it seems you used a tag sensor to see if you are under a platform. Well, tag sensors only detect the tag, not the platform it is on, so if the platform is very wide, the bot could be far from under the tag but right under the platform. I would use impact sensors on hologram blocks following the bot. This way, you need only one tag name and you can detect before the player truly hits a platform, so you don't need movers. And the counter system with jumping here doesn't work with bounce pads, hun ? | 2012-02-04 03:50:00 Author: Unknown User |
Hmm. The holo idea sounds like it may make things a bit smoother in execution. As for the chips... Yeah, I'm not a very organized person. If you saw how I originally set things up, you'd think this is clean in comparison. And I guess I didn't mention that I used tag sensors with maximum range, or even mention that they need to be big enough to detect one that's far away. I shouldn't assume people would know that... My mistake. For bounce pads, it would be possible, but you'd just need to add a bit of logic, I think. I can experiment later and see what happens. As things currently stand, this doesn't work with them. | 2012-02-04 05:42:00 Author: SuddenEnigma Posts: 70 |
Okay, I hope this doesn't constitute an infringement on double posting, but I've updated the first post with a much more streamlined method to get the same results. It even looks nicer in Play Mode. Just can't get Bounce pads working yet... Actually, I have figured out bounce pads. The logic I tried does work, but it needs some tinkering to be 100% reliable. Right now, the random bounce of the Sackbot causes problems, though to a lesser extent when the bounce pad is not automatic. | 2012-02-06 23:28:00 Author: SuddenEnigma Posts: 70 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.