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

Disabling movers When Opposite Is Active

Archive: 11 posts


Hi guys,

So I'm making a top down vehicular based level. The idea is that the vehicles are constantly accelerating. To do this, and to keep things at 90 degree angles, I am using square for left, circle for right. Triangle for up and x for down. I then have them connected to a selector which then connects to four movers. This is working fine, however I don't want people to be able to turn 180 degrees by pressing the opposite button ( Square after pressing Circle etc).

Is there any way to prevent circle from working when square has been pressed, to stop triangle working when x has been pressed and so on. I've tried all sorts and I'm going crazy!

Thanks for reading.
2011-02-03 13:29:00

Author:
Galactus_UK
Posts: 19


There definitely is - the possibilities are practical endless with the provided logic gates. I'm going to be jumping in to Create soon and I'll tool around with the concept to see if I can come up with a solution for you. I can't make any promises, but I'll certainly try to help out. From what you're describing, I think it will be relatively simple and shouldn't be too difficult to figure out, but not simple enough that I can give an answer off the top of my head.

I'll let you know what I find.

EDIT - Actually, I'm pretty sure there is a setting for the Selector that forces the Outputs to become active in order from bottom to top when the Cycle Input is activated. Wire the output of the desired button on the Controlinator into the Cycle Input, then from top to bottom, hook up the Outputs in order from first to last (if you want the order to go SQUARE, TRIANGLE, CIRCLE, X, then SQUARE will be the bottom input/output, TRIANGLE the next one up, and so on). The only problem is, as far as I can tell, that the four Outputs will now be controlled by a single Input (whatever button you have hooked up to the Cycle Input), but I can't be sure until I try it as I've never used the Selector's Cycle setting.

Try that out and see if that's what you're looking for. I actually did just think of that from the top of my head so there is a good chance it isn't right. I'll test it myself as soon as I get on.

EDIT EDIT - I found the Selector section of the Wiki here (http://wiki.lbpcentral.com/Selector). Give it a read if you haven't already. It might help you out. From what I've read so far, it sounds like my suggestion is your best option if you're going to use the Selector to control your vehicle. You do have other options, but I actually think your current set-up is a very simple and effective method for controlling the vehicle, especially since from the sound of it, the controls are meant to be triggered in a certain order instead of allowing the player complete control over the vehicle. In that case, the Selector and it's Cycle setting is ideal.

If you're interested in another more intricate setup that will allow the use of 4 separate buttons for 4 separate actions while preventing the use of buttons out of order, let me know, but like I said, I think your idea is the easiest option if you're OK with using 1 button for all 4 actions.
2011-02-03 14:15:00

Author:
sixfearstheseven
Posts: 19


I really appreciate you helping me out like this Thank you so much for your effort!

I'm going to give what you said a go and see what happens. Even using the D-pad would be ok if I could restrict the movements to 90 degree angles. My only problem then would be making the vehicle constantly accelerate after the D-pad had been released. I considered using L1 and R1 to rotate the vehicles at 90 degree increments. (how well this can be done I'm not sure) The issue I had then was making the vehicle move in that direction. I'll try a few things. Keep me posted if you can work anything out for me!

Thanks!!
2011-02-03 14:55:00

Author:
Galactus_UK
Posts: 19


No problem. I'm happy to help. Being laid off during the winter leaves me with too much free time, so you're actually doing me a favor by giving me a project to work on lol.

I'm jumping into an empty level on my Moon right now, so hopefully I'll have something for you soon.
2011-02-03 15:06:00

Author:
sixfearstheseven
Posts: 19


Little modification to six's method.

Put down 4 XOR gates - one for each input. Feed each of the inputs through their own XOR gate. Set up a selector with 5 inputs (and 5 outputs). Leave the first one empty (I'll explain later). Feed each wire from the XOR gates into one of the remaining 4 selector switch inputs. Feed each output of the corresponding input on the selector switch to both the opposite's XOR gate and the mover for that input. So if it's X's input, you hook the output for the X wire into O's XOR gate, and also into X's mover.

The reason for the empty selector switch input/output is that this is where you set the selector to start when you enter the controllinator. This way you can initially press ANY of the four buttons. Otherwise, whoever is in the first slot would disable it's opposite's input. So if O was in the first slot, you couldn't push X until you press triangle or square. Of course it's possible you may WANT to do this, if you don't want anyone to initially press X (backwards) until they go some other direction.

EDIT: Realized this won't work because initially the inputs to the XOR gates will be zero which will return a 1 to the selector from all four inputs. It's solvable, and I have a solution, but it's too complex to put into words. It involves a couple more gates but the wiring gets too difficult to describe. I'll work it up if you still need a solution.
2011-02-03 16:16:00

Author:
Shanghaidilly
Posts: 153


Would it be possible to make R1 turn the vehicle right and L1 make my vehicle turn left?

For example, if I was aiming upwards it would take one press of L1 to turn to the left. Or one press of R1 to turn to the right. Or two presses of either L1 or R1 to turn to face downwards.

Thanks.
2011-02-03 17:48:00

Author:
Galactus_UK
Posts: 19


Sorry I've taken a while to respond. I started doing this and thought I found a better solution and that eventually snowballed in to me going crazy and losing track of what I was originally working on. My idea as stated in my first post isn't working for me, though, unless I messed up the wiring, which I am checking now. If it doesn't work, I'll try to see what other options there are.

As far as I'm aware, to make a vehicle turn left with L1 and right with R1, all you have to do is add 2 Movers to your Controlinator microchip and wire the Outputs from each button into their own mover. You want to make sure that you mirror one of the Movers so that it's Left/Right Input is pointing one way, and the Left/Right Input of the other Mover is pointing in the opposite direction, otherwise both buttons will cause the object to go the same direction (personally, I'd turn one 90 degrees to the left and the other 90 degrees to the right so that the Up/Down Input acts as a Left/Right input because the pointy thing on the top is much easier to see and line up properly, then just be sure to change the Left/Right Speed to 0 and the Up/Down Speed to however fast you want your vehicle to move in either direction.) Set acceleration and deceleration to whatever you'd like and there you go. It shouldn't be any more complex than that, but once you start adding more actions, you might want to look into adding certain gates to ensure the actions aren't interfering with one another in a way that you don't want them to.

EDIT - I didn't realize you said "turn," not "move." To make it actually TURN, you have a few options. First one is a Joystick Rotator, but that would require pressing R1 or L1 and moving a joystick, so probably not the best option. The best one I can think of is to add two Gyros, put one by each Mover that I mentioned above and angle one about 45 degrees to the left and the other 45 degrees to the right. Hook the R1 Output into the Gyro that points slightly right, and L1 into the Gyro that points slight left. Now, when you press R1, the object will angle itself 45 degrees to the right and move to the right simultaneously, while L1 will do the exact opposite. If you go this route, you'll need to add another Gyro to the Controlinator chip that points straight up and is not hooked up to anything so that when you release R1 or L1, the normal Gyro will take priority and realign the vehicle.

This presents one more problem...

This means that the vehicle will angle itself in the direction it's moving, but with the Movers set to move only from side to side, it means the vehicle will only move from side to side. The reason I suggested this was because I assume your vehicle already has the ability to move forward, so that, in combination with the Gyros and sideways Movers, should make your vehicle actually turn into its turns. If you don't already have Up/Down capability, then you're going to have to add a few more objects to the Microchip, but I won't get in to that until I know for sure that you need me to (and if you do need me to, I'm more than happy to explain, but I rather not type it all up right now if you already have it covered).
2011-02-03 18:03:00

Author:
sixfearstheseven
Posts: 19


Thanks again. The problem I'm having is that the gyroscopes only allow me to turn left or right on the level rather than turn my actual vehicle left or right at 90 degree angles. I tried connecting R1 to the Cycle input on a selector which then went through all four directions on the gyroscope. This worked until I tried doing the same for the opposite side. Pressing R1 twice would leave me in a different position on the cycle of the L1 selector. (hope that makes sense!)2011-02-03 18:30:00

Author:
Galactus_UK
Posts: 19


So if I'm reading you right, the Gyro is causing YOU, the player/Sack Thing, to turn, but leaving the vehicle at it's original orientation? If that's the case, take the Gyro's off the Controlinator chip and add them to a separate Microchip that is attached directly to the vehicle itself. Keep the inputs the same as before. Now the vehicle should turn and, in effect, turn the attached Controlinator with it...that is, of course, if I didn't totally misunderstand you, for which I apologize in advance.

As for the Selector issue, do you have R1 and L1 hooked up to the same Cycle input on the same Selector?
2011-02-03 18:51:00

Author:
sixfearstheseven
Posts: 19


By George I've got it! I connected L1 and R1 to a direction combiner. I then connected the output of the combiner to the cycle input of a 4 port selector. The 4 outputs then connected to up, right, down and left movers in order. When I pressed L1 it cycled one to the left, when I pressed R1 it cycled one to the right. So simple! I knew I was making things too complicated.

Thanks a lot for your help. Feel free to add my PS ID of the same name. I'll keep you posted on the levels progress!
2011-02-03 19:14:00

Author:
Galactus_UK
Posts: 19


Excellent! I'm glad you resolved it.

I will definitely add you when I get on my PS3 later.
2011-02-03 21:22:00

Author:
sixfearstheseven
Posts: 19


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.