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

How to stop one method and simultaneously start another?

Archive: 3 posts


I'm trying to use the logic tools so that every time an animation plays, a counter begins to fill. Once this counter fills, I want another method to start (which uses the same logic, but instead with a different animation). It seems like this would be easy enough to do, but I just cannot figure out how. I don't want this to get muddled, but here are a few details that might help:

-This "series" of subsequent sets of animations is activated by holding down R2 the entire time.
-If R2 is let go during the series, I want it to restart completely the next time it is pressed.
-Once a counter for one set fills and the next begins, I not only want the first method to stop, but for the counter of that method to reset.

Hopefully I didn't make this too confusing, I'm sure there's a simple solution. Thanks for any help!
2012-01-05 04:11:00

Author:
Rainbro Dash
Posts: 121


It's fairly easy, are you using a selector for all of the animations?2012-01-05 04:55:00

Author:
Tyranny68
Posts: 390


Yep, you want a selector. Only one output of the selector will be active at any one time so it's ideal for this kind of thing.

Have the R2 output wired into a pulse counter (counter set to 1 with its output feeding into its reset) that is then fed into the first input on the selector. Have the selector's first output feed into your first counter animation thing. To reset a counter simply have its output feed into the reset input on the bottom. You'll also want to have the counter's output feeding into a tag. Attach a corresponding tag sensor to the cycle input of the selector and what this will do is when the counter resets it will pulse to the tag sensor notifying it to jump to the second output port on the selector. Connect this output to your next animation and repeat the process for however many you need.

This will achieve what you've outlined above, however if you want the whole think to reset when you let go of R2 you'll need one extra piece of logic. You'll need to have an additional port on your selector that outputs to nothing. Have your R2 output feed into a NOT gate, then have this NOT gate feed into the null selector port. This way when R2 isn't being pressed nothing will happen. If you want your animations to reset also at the same time, feed the output of the null port into each of the animation counters' resets.
2012-01-05 16:51:00

Author:
Xaif
Posts: 365


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.