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

Logic Help: Detect signal change (or: on button release)

Archive: 7 posts


I want to create a Railgun tank that can charge it's shot. The longer you charge the further the bullet will fly, seperated in 3 charging-levels. The shot shall be fired whenever the Player releases R1.
I got a good understanding of logic gates but I am not shure how to get this done. I fiddeled arround with some toggles and XORS that form loops and I got somethign that almost seemed to work, Sadly it prove unstable.

Now I want to ask you logic experts out there if the construction of a "Change Detector" is possible with the tools provided in LBP2.

I will keep on trying since I heard anything can be done with enough XORs and toggles
2011-01-23 19:46:00

Author:
The5
Posts: 51


Done:
http://dl.dropbox.com/u/17364025/Images/Temp/LBP2%20-%20On%20button%20Release%20Detector%20%28Charge%29 .jpg
2011-01-23 20:30:00

Author:
The5
Posts: 51


Interesting.

You could also have your button going into a counter set to count to 1. Have that counter going into an AND gate that feeds into your firing mechanism (this will arm it when you press the button)

Have the same button going into a NOT gate that feeds into your previous AND. This will complete the AND circuit on release of the button.

Have the AND circuit also feed into the reset on your counter so that it resets the firing mechanism when you are done. That will make your firing mechanism.

You could try also attaching a battery to the first input on a selector, then attach your button onto a timer chained to another timer with them connected to input two and three of the same selector. as each timer increases to the max, it will change your selection (a selector can only have one active output, and it will be the highest numbered one with an input). That should give you your power level. Also connect the reset on both timers into the AND circuit from before.

Now for connecting the two into actual damage? I dunno. That depends a lot on where and how you are controling your damage.
2011-01-23 21:30:00

Author:
tdarb
Posts: 689


Thanks for your guidance tdarb!


Interesting.

You could also have your button going into a counter set to count to 1. Have that counter going into an AND gate that feeds into your firing mechanism (this will arm it when you press the button)

Have the same button going into a NOT gate that feeds into your previous AND. This will complete the AND circuit on release of the button.

Have the AND circuit also feed into the reset on your counter so that it resets the firing mechanism when you are done. That will make your firing mechanism.

Have not thested this yet, but sounds verry good and uncomplicated.
Maybe this might run into problems when tabbing R1 quickly. Mine seems to be solid aggains such stuff.
I will try it out asap



You could try also attaching a battery to the first input on a selector, then attach your button onto a timer chained to another timer with them connected to input two and three of the same selector. as each timer increases to the max, it will change your selection (a selector can only have one active output, and it will be the highest numbered one with an input). That should give you your power level. Also connect the reset on both timers into the AND circuit from before.

I did something similar myself, the Tanks main cannon works already.
Right now im doing a MG that will overheat after a while



Now for connecting the two into actual damage? I dunno. That depends a lot on where and how you are controling your damage.
Right now it just controlls how far the projectile will travel. I did this by using 3 Spawneders with different accelerations, all usign the same projectile etc.


EDIT:
Seems liek i could use soem help with the cooldown.
Trying somethign with a counter that decreases by 1 every [unit of thime here].
2011-01-24 14:25:00

Author:
The5
Posts: 51


If you are worried about what happens when you press R1 rapidly, or you only want to be able to shoot every x.x amount of seconds, tie it all to a sequencer with the firing in the beginning and emptiness for the amount of cooldown you want. A sequencer will not restart until it is complete.

In fact, doing that you can tie a light to when it is able to fire so you can visually see when it can be fired again and when it is cooling down.
2011-01-24 16:05:00

Author:
RSQViper
Posts: 302


You could set a timer that resets when the counter is not empty and keeps decreasing every 1 second to make a cool down I think.2011-01-24 16:10:00

Author:
TheSwede
Posts: 59


Sorry guys, I did not chack back the last 2 hours and totally missed your replys.
Meanwhile the Railgun-Tank got finished (still WIP though)
Have a look
https://lbpcentral.lbp-hub.com/index.php?t=45263-The5-present...-The-Railgun-Tank!-WIP
2011-01-24 18:53:00

Author:
The5
Posts: 51


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.