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

Make a platform stop at certain points

Archive: 18 posts


I'm looking for a similiar effect of the Variable Length Pistons (https://lbpcentral.lbp-hub.com/index.php?t=16124-Variable-Length-Pistons-%28Stops-at-different-locations%29) that was a very neat feature in LBP1. However, I want some added effects to this.

There are two switches, when you pull the first one, the platform ascends from piston length 0.0 to 22.0 over 4 seconds, pauses for 1-2 seconds, then goes back down and rinse and repeat. And when the second one is activated, the platform ascends/descends from 22.0 to 62.5 by around 10 seconds for each direction.

And of course if you happen to fall of the platform when it goes from the middle to the highest part, you should be able to pull either the first switch or a third switch to reset the whole mechanism so you can get back on it again.

If somebody can tell me very detail-ish how to do this, I will bake him/her cookies to last for a month.
2011-02-22 08:41:00

Author:
Archideas
Posts: 88


I you just made me come up with how to do this. I say hologram, pistons, and anti gravity tweakers. Uhh... I could explain it but I think you know what I mean?...

Perhaps another way would be movers. After a set amount of time has passed they stop, and another activates. Or you can use holograms as a stopping spot.
2011-02-22 08:48:00

Author:
Devious_Oatmeal
Posts: 1799


I'm very bad with logic to begin with, so a more detailed explanation would help. :blush:2011-02-22 09:34:00

Author:
Archideas
Posts: 88


I'd suggest using movers instead of pistons, because they are easier to work with.

You're going to need a few components. On your platform, you'll want to put an anti-gravity modifier and a gyroscope. Set the anti-gravity settings to zero. Set the gyroscope so it won't let your platform tip.

Let's break this into two microchips - one for the bottom to the middle, and one from the middle to the top.

First, getting to the middle.

The easiest way to get the platform to stop is by using tag sensors. Put a tag sensor on the edge of your platform and place a tag somewhere close to the edge of your platform in the middle where the platform will stop. Set the color of the tag the same as your tag sensor and adjust the radius of the tag sensor so it detects the tag where you want the platform to stop.

Put a microchip on your platform. Place a counter on your microchip and set the counter to 1. Hook your first switch into it. Hook the output of this counter into one of your movers. Set the mover to the speed you want (and direction).

Put a timer onto your microchip, set it to "Start count up". This is the delay when you get to the middle area so set the time here accordingly. Hook your tag sensor's output into the input of this timer and also hook the tag sensor into the reset switch of the counter. Also hook the output of the timer into your "down" mover. Adjust the mover as necessary. Put another tag sensor onto your platform and a tag at the bottom. Make these a different color than your middle tag sensor. Hook the output of this tag sensor into the reset of your timer.

So what happens is this: You throw the switch, and the counter goes to one. The platform will move up. When it gets to the middle, the tag sensor is tripped which resets the counter and so the platform stops. It also starts the timer. When the timer fills up, the platform moves back down. When the bottom tag trips the other tag sensor, the timer is reset, so now the platform stops again.

Get this working and we can work on the second part.

BTW, if you need a delay before the platform starts moving up, use a timer instead of the counter.
2011-02-22 15:50:00

Author:
Shanghaidilly
Posts: 153


I've followed your instructions and so far it goes up to the tag, and when the sensor notices it, the platform drops down immediately, instead of going back at the same speed as it did when moving up. And it repeats this procedure over and over again.

*EDIT*

The Anti-Gravity's settings are all 0%, which I assume is what I was supposed to set it to?
2011-02-22 17:11:00

Author:
Archideas
Posts: 88


Oops. Try setting the anti-gravity setting to 100 (bouyancy to zero and dampening to zero). I think I was thinking backwards.2011-02-22 17:46:00

Author:
Shanghaidilly
Posts: 153


I guess I'll have to experiment with the anti-gravity. If I set it to 100%, it slowly floats furher up and away from the tag, stopping the platform from going back down again. :<2011-02-22 17:50:00

Author:
Archideas
Posts: 88


I guess I'll have to experiment with the anti-gravity. If I set it to 100%, it slowly floats furher up and away from the tag, stopping the platform from going back down again. :<

I haven't messed much with it, but I think the dampening can help you here (gives it a kind of friction). In fact, I think if you set the dampening to 100, it will immediately stop.
2011-02-22 17:51:00

Author:
Shanghaidilly
Posts: 153


I set the dampening to 50% and it stops right when it reaches the tag now. However, the platform mechanism doesn't repeat itself. When I pull the switch, the platform goes up, notices the tag, waits 2 seconds, then goes back down. Why isn't it resetting itself?

I've done everything exactly as you've described.
2011-02-22 18:22:00

Author:
Archideas
Posts: 88


I set the dampening to 50% and it stops right when it reaches the tag now. However, the platform mechanism doesn't repeat itself. When I pull the switch, the platform goes up, notices the tag, waits 2 seconds, then goes back down. Why isn't it resetting itself?

I've done everything exactly as you've described.

I'm a bit confused on what you want. Do you want the platform to keep going up and down? Or do you want it to stop at the bottom and require the switch to be thrown again?
2011-02-22 18:24:00

Author:
Shanghaidilly
Posts: 153


I want it to keep going up and down.


There are two switches, when you pull the first one, the platform ascends from piston length 0.0 to 22.0 over 4 seconds, pauses for 1-2 seconds, then goes back down and rinse and repeat.
2011-02-22 18:30:00

Author:
Archideas
Posts: 88


I want it to keep going up and down.

Sorry, when you said "rinse and repeat", I thought you meant pulling the switch as well. There's an easy fix though. Take another timer as well as an AND gate and put it in your microchip. Hook the output of your counter into the AND gate. Also hook the bottom tag sensor into the AND gate. Hook the output of the AND gate into the timer. Set the timer for how long you want the platform to remain at the bottom and also set it's input to "Start count up". Hook the output from the middle tag sensor into the reset of the timer. Unhook the connection to the reset switch of the counter. Hook the new timer into your mover for going up.

So what should happen: If it wasn't for the AND gate, as soon as your level would start, the bottom tag sensor would start your platform. Since you want a switch to be thrown, this is what will keep it from doing that.

When the switch is thrown, the counter fills up. Now both the tag sensor and counter will start your timer. When it fills, the platform moves up. When it gets to the top, the timer is reset and the platform stops. Your second timer starts to fill up and once full, the platform moves back down. When your bottom tag sensor is tripped, it resets the timer for the middle, and starts the timer for the bottom again. Now it should repeat itself over and over.
2011-02-22 18:46:00

Author:
Shanghaidilly
Posts: 153


It's entirely my fault for being so unspecific about what I wanted, sorry about that. But it's working like a charm now! Really, thanks alot for your help so far.

How would I go about to make the last part so that the platform would rise from the bottom, to the second point when the second switch is activated?
2011-02-22 18:55:00

Author:
Archideas
Posts: 88


It's entirely my fault for being so unspecific about what I wanted, sorry about that. But it's working like a charm now! Really, thanks alot for your help so far.

How would I go about to make the last part so that the platform would rise from the bottom, to the second point when the second switch is activated?

All we really need to do is deactivate the middle tag and put another tag, exactly like the middle one, at the second level.

We need another counter. Invert the output of this counter and set it to 1. Hook it's output to the middle tag's activate switch. Hook your second switch to this counter.

When you throw the second switch, it will deactivate the middle tag so the platform will keep going until it hits the second level. When it does, the tag trips the tag sensor just like the middle and now the platform goes between the bottom and the top and repeats itself.

Questions though. What about resets. Like what about if the player trips the second switch first (or can they, without going to the first level)? I don't know the location of your switches. Also, you mentioned resetting the whole thing if the player falls off.
2011-02-22 19:16:00

Author:
Shanghaidilly
Posts: 153


The player can't reach the second switch without first activating the first one. I had originally planned to make it so that the platform would move from the middle point to the top point, but that was with the pistons limitations. With movers, there's no such problem so it'd be much easier on the player if the platform just goes from bottom to top when the second switch has been pulled.

*EDIT*

It's working like a charm! Thanks again, Shanghaidilly for your brilliant help. It's really appreciated.

Here are the cookies, as promised.

http://www.toomanymornings.com/wp-content/uploads/2010/09/Cookies.jpg
2011-02-22 19:22:00

Author:
Archideas
Posts: 88


*munch* *munch* *munch* Yummmmmmmmmmmmmmm!

You're welcome. *Shang goes back to munching on warm internet cookies*
2011-02-22 19:52:00

Author:
Shanghaidilly
Posts: 153


HHHHUUUUUUUUGEEEEEEEE problem with this logic. I thought this would work too, but it doesn't. The "player" element is a very bad variable. If the player jumps onto the platform or they jump when the platform is moving horizontally, it'll go off course. You could stick a camera on it, but that limits the mobility on the elevator.

My solution was a follower, but when the player jumps it goes off a little, but goes back on path.
2011-02-23 00:13:00

Author:
Devious_Oatmeal
Posts: 1799


What if you took a page from the original solution, and added a stiff piston of strength 0? That should keep it going where it needs to go, while providing absolutely 0 movement force.2011-02-23 00:51:00

Author:
Tygers
Posts: 114


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.