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

[Advanced?] Multi-Floor Elevator

Archive: 17 posts


I'm stuck trying to figure out how to make both a smooth and neat functioning elevator. This is what I want to accomplish.


~ End Result ~

Entering the elevator, you're prompted to press Triangle to enter a controllinator.

When you're in the controllinator, you can either press up or down on the left stick to make the elevator move upwards or downwards until it reaches the next floor in the direction you pressed.

So if you press up, the elevator will move upwards until it reaches the next floor which is marked by a tag. You won't be able to interfere while the eleavtor's moving. Same result but downwards if you pressed down on the left stick.

I have 4 floors, and each time you reach a new floor, there should be an one second delay before you can move upwards or downwards again.


~ End Result ~

However, in my level, you won't be able to use the elevator until you've restored the electricity in the facility. How do I prevent the player from entering the elevator before a certain switch or whatnot has been activated? As of right now, I can just press Triangle even though the elevator doors are closed to enter.


Lots of love will be dealt out to whoever helps me! <3 (No homo)
2011-06-08 08:15:00

Author:
Archideas
Posts: 88


The bottom input of the DCS makes the seat unenterable. Whatever you have that triggers the power, use a NOT to make the signal false and put into the 'eject' (bottom) input.

Now, when the player restores power, the DCS will suddenly be usable.

As for moving elevators, there are several ways you can do this. Something simple would be using a selector with as many inputs as you have floors. Put the selector outputs to different followers (follow tag), each going to their respective floors.

On the DCS, put up/down into an AND gate along with a timer (count up). Put the up/down into the reset of the timer as well.

Use a sensor (player, tag, whichever), at each floor and put into an OR gate (with as many inputs as there are floors) which goes into the timer.

It's a rough explanation, but hopefully it helps.
2011-06-08 09:09:00

Author:
SSTAGG1
Posts: 1136


I've set up as you've told me, but it doesn't really work. This is what I have so far.

http://i586.photobucket.com/albums/ss302/Archideas/APhoto_1.jpg

*EDIT*

I removed the anti-gravity tweaker as I figured it interfered with the followers. However, it still won't budge at all. :/
Also ignore the nodes attached to the selector, they've been removed as well.
2011-06-08 13:36:00

Author:
Archideas
Posts: 88


Do the same thing with the not gate. Use an AND gate, connect the left stick to one of the ports and connect an OR gate with 4 ports up to a selector. Connect 4 tag sensors, each with a different label like floor 1, floor 2, ect, to the or gate. Create 4 followers each with the 4 labels and connect the selector to each of them.

Haven't actually tried this just thinking off the top of my head.

Edit: Almost forgot, put a tag sensor on each floor
2011-06-08 14:13:00

Author:
Jakeamorris25
Posts: 72


The bottom input of the DCS makes the seat unenterable. Whatever you have that triggers the power, use a NOT to make the signal false and put into the 'eject' (bottom) input.

Now, when the player restores power, the DCS will suddenly be usable.

As for moving elevators, there are several ways you can do this. Something simple would be using a selector with as many inputs as you have floors. Put the selector outputs to different followers (follow tag), each going to their respective floors.

On the DCS, put up/down into an AND gate along with a timer (count up). Put the up/down into the reset of the timer as well.

Use a sensor (player, tag, whichever), at each floor and put into an OR gate (with as many inputs as there are floors) which goes into the timer.

It's a rough explanation, but hopefully it helps.

This is a pretty good approach. The only thing to look out for is that the selector will rollover when you get to the top or bottom floor if you keep pushing up or down respectively. To avoid that, you'll need a way to tell the system not to count up if you are at the top, or down if you are at the bottom.

You'll need to have a direction splitter hooked up to your up/down output (probably the analog stick or directional pad). Run the + output to an AND gate, and take the highest floor selector output also to this AND gate. Now wire the output from the AND gate to a direction combiner's + input. Then take that output to the selector's cycle input.

Do the same for the bottom floor and the negative output. You'll need another AND gate, but you'll use the existing splitter and combiner.

As for why it's not moving, I'm not entirely sure. The anti-gravity tweaker by itself will not make the object unable to move, unless you had turned up the dampening setting. However, seeing as you had removed it, it's a non-issue.

My guess is that the elevator is inadvertently glued to another object in your level. Make sure the elevator is a free standing object, with no rods, string, glue, or other connectors linked to anything else in the level.

Also make sure that you've turned the minimum following radius for the followers all the way down to 0, and turn the max following radius up to a large number, like 1000. Should be more than you need.

SSTAGG1's description also refers to setting the followers to "require tag." Make sure each floor has it's own tag and that each follower is set to follow those tags/labels respectively.

Finally, you'll need a way for the player to get out of the control seat when they reach the floor they want. If you use SSTAGG1's approach, then you'll need to run that NOT gate into an OR gate, then attach another button to the OR gate (like circle) that will also be connected to the eject button.

If you try all that and it still doesn't move, let me know!
2011-06-08 17:12:00

Author:
shane_danger
Posts: 283


Thanks for that, shane. I'll try it out when I got the time!

*EDIT*

This is what I got now. It still won't budge.

http://i586.photobucket.com/albums/ss302/Archideas/Logic.jpg

Each floor has its own labeled tag to seperate them from each other so the Followers can easily identify the right one.
2011-06-08 17:13:00

Author:
Archideas
Posts: 88


Are you sure that it's not glued to anything?2011-06-08 19:29:00

Author:
SSTAGG1
Posts: 1136


Try removing all but one follower and see if that one works by itself. Mulitple movers on the same object tends to cause problems.2011-06-08 19:47:00

Author:
Ayneh
Posts: 2454


Ah, wow, of course. I had just run into that issue myself. Awful memory. If you put each on it's own MC, and power the MC with the selector, it might work (I think that's what I did).2011-06-08 20:05:00

Author:
SSTAGG1
Posts: 1136


Ah, wow, of course. I had just run into that issue myself. Awful memory. If you put each on it's own MC, and power the MC with the selector, it might work (I think that's what I did).

That may work. I usually have to do that with movie cameras. I can't get them to work right unless they have their own microchip.
2011-06-08 20:24:00

Author:
shane_danger
Posts: 283


So did you get it to work?2011-06-09 08:03:00

Author:
Jakeamorris25
Posts: 72


Hehe, Archi, you asked me for help on this last night (and we fixed it) and only now I see this thread. At first I didn't even notice that you were the poster.

Post a screenie of how we did it for posterity. Learners gonna learn.
2011-06-09 10:43:00

Author:
Antikris
Posts: 1340


As Antikris mentioned, I asked for his help and he managed to make it work as I wanted. Here's the result of the few minutes it took him to make it work after a few hours of my failed attempts!

http://i586.photobucket.com/albums/ss302/Archideas/ElevatorLogic.jpg

The end result allows you to move up and down, stopping at each floor as you go in whichever direction you want. I also added a tag to the controllinator to detect when you come to a new floor, giving you a typical *pling* sound.
2011-06-09 17:00:00

Author:
Archideas
Posts: 88


Hmm, you got it to work with the all the followers in the same MC part. Going to have to go simplify my stuff...again. Any idea what was causing the issue?2011-06-09 18:38:00

Author:
SSTAGG1
Posts: 1136


No, Antikris fixed the whole thing for me, so I'm unfortunately not able to give any answers on what was wrong.

But if anyone wants a working elevator with multiple floors, this logic should do the trick!
2011-06-09 21:12:00

Author:
Archideas
Posts: 88


Ah, so in my head, I had those NOT gates hooked up, but I did not mention them in my description... sorry about that. that looks like the only thing that really changed. Antikris loves one shot timers too... so I'm sure those were instrumental in making the whole thing work.

Glad you got it sorted.
2011-06-09 21:22:00

Author:
shane_danger
Posts: 283


I think the biggest difference is the NOT gates in between output #4 and #1 of the selector, hooked to the AND gates, letting the negative and positive signals through when not at their respective limits. If I recall correctly, the original setup only let the signals through when the elevator was at its limits.

Also, your setup continued with evaluating a copy of the raw L-stick output after another had already been processed, possibly leading to a lag between the two at the moment both results were combined. We took that apart, used one raw output signal from the stick and interrupted that at the bud for 1 second whenever the elevator arrived at a floor.

I can't exactly make out from the shot, but did we also prevent changing elevator direction in between two floors in this setup? I think we did; the component closest to the L-stick is an inverted counter, getting set to false after a successful movement signal. Now, mid-course no user input is accepted (at the AND gate before the splitter). Arrival at a floor (signal on the 4-part OR gate) triggers a timer (inverted, counting down) that when expired resets the counter behind it, allowing again for user input.
2011-06-10 00:05:00

Author:
Antikris
Posts: 1340


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.