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

Artillery help

Archive: 3 posts


Could anyone tell how i might make logic for artillery so everytime its shoots theres blowback and when you shoot to rapidly you overheat causing you to have to wait 5 seconds before you can shoot again2012-03-25 13:23:00

Author:
Unknown User


2 timers, 1 AND gate and a NOT gate.

The trigger button (whatever you press to shoot) inputs to the first timer, which will be set to X number of seconds and to "forward/backward". This timer's output should be wired to the NOT gate as well as to the 2nd timer.

The 2nd timer is your cooldown timer which should be set to 5 seconds, and "start count up". This timer's output should be wired to the reset port of the 1st timer, as well as to it's own reset port.

Now connect the trigger button output and the NOT gate output to the AND gate input. The AND gate's output connects to the emitter that fires the ammunition.

This is not just a theoretical solution. I just tested it in create mode for you and it definitely works.

Edit: you might want to make your timers visible to the player so they can actually see when the gun/canon gets close to overheating and how long they have to wait before they can fire again if it does overheat.
2012-03-25 18:00:00

Author:
Ungreth
Posts: 2130


Try doing what Ungreth said for the overheating, but connect the output to a sequencer instead of directly do the emitter. I like using sequencers for weapons, and then you can put your recoil, firing sound, projectile, smoke, muzzle flash and whatever else you want all together.

For the recoil you can use a mover set to local space yes, and speed 100. Make it so it only lasts for .1 second on the sequencer and depending on how heavy the gun is you may want to add a reverse mover, or a Anti-Gravity with high dampening directly after for a split second to prevent it from sliding across the map.

I probably overcomplicated what I just said, but that should work.
2012-03-28 01:13:00

Author:
Unknown User


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.