Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Trouble Creating Logic for a Charge Blast
Archive: 12 posts
I am really really trying to create a bug/glitch free charge shot for my sackbot. What I mean is, my sackbot shoots a basic projectile silmilar to megaman. And when he holds down the fire button for 2 seconds and release he lets go a huge charged blast. I've created it, but mine has all kinds of bugs/glitches. Mainly, when I hold down the fire button his charge up looks awesome. But if I turn the opposite direction while pressing charge he'll automatically fire the blast. What I want to do is hold this charge until I let go of the fire button. I want to be able to turn and run the other way if I have to without firing the blast. You don't want to know how long I've been trying to fix this. It's driving me crazy. Does anyone out there know how to create a charge shot? Can you provide any pics or explain logic step by step? | 2011-02-23 22:21:00 Author: rambo3416 Posts: 179 |
It would probably be even more useful if you could provide pics of how you are currently trying to achieve this. We might be able to spot the problem. | 2011-02-23 22:38:00 Author: v0rtex Posts: 1878 |
Charge blast using sequencer and timer. Use a splitter to split left / right (stick, d-pad?), put both values into to a sequencer with a battery for entire duration. Put each battery into a selector, and have an AND for each stage of the sequencer and each selector. This should produce a charge up effect which can be toggled in appearance left and right. Dunno how you wanted to do the blast, but should just continue off of which selector option was used. | 2011-02-23 22:48:00 Author: SSTAGG1 Posts: 1136 |
Sorry Stagg but I didn't fully understand it. How many batteries into the sequencer? The splitter plugged into both sequencer inputs? One of them is a reset. Sorry, at the moment I can't provide a photo of the logic I used, but here's what I did to create my charge blast: 1. Hook up the left analog thumb stick, left/right into a direction splitter. 2. Then I hooked both outputs of the splitter into a 2 port selector. 3. Then I put two and gates onto the microchip. 4. I then plugged both outputs of the 2 port selector into one input of each and gate. 5. Then I placed two timers onto the microchip. 6. I then placed two additional inverted and gates on the microchip 7. I plugged the first two and gates into the two timer outputs and resets and one input of each inverted and gate. 8. I plugged the output of each timer into the other input of each inverted and gate. 9. The inverted and gates are then plugged into the emitters for the charge blast. I can shoot in which ever direction I'm facing and it appears to work perfectly. But the problem is, when I complete charging the blast and still have the shoot button held down and I turn in the opposite direction, the blast fires automatically without me letting go of the shoot button. It's not supposed to fire unless I let go of the shoot button. But when I turn the opposite way, it registers as me letting the button go and fires. I would like to hold the button down for as long as I want and not fire until I let go of the button. It would be ideal to just add something to this logic I used, but I'm open to try other ways also. | 2011-02-23 22:59:00 Author: rambo3416 Posts: 179 |
Sorry, I meant two different sequencers, one for negative horizontal values, one for positive horizontal values. Also, a single battery in each sequencer that covers the entire thing (nothing over sides though). This would convert any analog signal > or < 0 into a digital signal of 1 for that direction, thus determining which animations are used as a result of the selector and AND gates combined with the charge-up sequencer (otherwise, your thumb-stick values would only switch when the stick was pushed past 75% movement, not responding to small changes in direction). It sounds like you have the direction and charge systems dependant on each other, so when you change the one, it affects the other (I didn't understand your logic above, but seems likely). I would suggest reorganizing you logic into one section just for charge, and another for direction. I've made a charge up attack which is aimed using the right stick (or my lock-on system, but that's another thing altogether). I use a timer to charge attack, and this goes into a sequencer to provide a visual component to the charge (though it's not exactly accurate to what damage is done, since each animation has a range of values which power it). A picture would help us better understand the organization. You can take one through the game and export to HD, use media or USB to send elsewhere so its viewable here. | 2011-02-24 00:50:00 Author: SSTAGG1 Posts: 1136 |
You said I can export a picture to HD? What's HD? | 2011-02-24 01:50:00 Author: rambo3416 Posts: 179 |
Your Hard Disc Drive (though really its HDD, I missed the extra D ). | 2011-02-24 01:54:00 Author: SSTAGG1 Posts: 1136 |
Hold and release commands are actually fairly tricky circuits. I spent several hours working on one this last weekend and the one I ended up with is pretty clean (and generic). The real trick is paying attention to all the interrupts. Can you let me know how far you got/what is giving you trouble? | 2011-02-24 03:01:00 Author: dcf Posts: 468 |
Hold and release commands are actually fairly tricky circuits. I spent several hours working on one this last weekend and the one I ended up with is pretty clean (and generic). The real trick is paying attention to all the interrupts. Can you let me know how far you got/what is giving you trouble? I accomplished setting up my charge shot, and it's awesome. I hold the fire button down for 2 seconds to complete my charge then I let go to fire the blast. If I interrupt during the charge it resets. The problem is, as I'm holding down the charge button, and I turn in the opposite direction, I fire the blast. I don't want that. I have everything set up through a splitter and selector. That's how the logic starts. Do you have any suggestions on how to accomplish this? Above I explained step by step what I did. I might try to provide a picture. | 2011-02-24 04:14:00 Author: rambo3416 Posts: 179 |
You should end with the splitter and selector. Start with just the button hold and don't determine direction until the end. Basically once you release the hold button, send a pulse to an AND gate that is fed by your splitter/selector. Then send the AND gate to the emitter of your choice. (Or, if the emitter is complicated, a sequencer.) | 2011-02-24 04:18:00 Author: dcf Posts: 468 |
I may have gone overboard with this response, so I made it a tutorial. Here's the link. (https://lbpcentral.lbp-hub.com/index.php?t=50873-How-To-Create-a-Chargeable-Attack) | 2011-02-24 04:25:00 Author: SSTAGG1 Posts: 1136 |
Thanks a lot. I'll apply this ASAP | 2011-02-24 04:30:00 Author: rambo3416 Posts: 179 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.