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

Conditionally destroying weaponized objects?

Archive: 4 posts


Hello fellow crafters!

I have a conundrum at the moment that I hope someone can help sort out. I'm making a custom weapon that emits another weapon, and then gets destroyed (all straight shots). This is supposed to result in a short to medium ranged "building wave" type of effect. I have the emitters on a timer for ~.5, and a destroyer on a timer for ~.6. The emitters work well, but the destroyers don't seem to work. Is this just a property of weaponizing? Or is there a way to conditionally destroy a weaponized object?
2013-09-20 15:20:00

Author:
StJimmysAdiction
Posts: 388


In my experience this isn't easily doable. Anything that interferes with a weapon's natural properties (like physics, etc.) gets overwritten whenever the weapon is spawned. There IS a way to cheat it though. I found it after trying to produce a shotgun-like weapon with limited range:

1. Create a generic projectile with single-hit destruction and no bounce.
2. Add an emitter that emits a weaponized piece of forcefield (slowest speed possible) that's large enough so that the parent weapon can't miss it. Make it emit and destroy that piece for a fraction of a second (0.1).
3. Space that piece of forcefield just far enough that on the instant it is emitted, it impacts the parent projectile.

By doing this, you effectively exploit the parent weapon's destroy impact mechanic by emitting a surface directly in front (or in some cases, between the project as it passes by), causing the weapon to explode. There's a lot of timing involved to account for your parent projectile's speed as opposed to the obstacle it generates, but it worked out pretty sweet for me.

In your situation, possibly making that generated piece of forcefield do double duty would work best: have it generate the next projectile AND stop the previous one.

If you want a live example, check out the copyable version of this level (https://karting.lbp.me/v/fm89); there's a special weapon called "thunderflare" in it that uses the trick.
2013-09-20 20:02:00

Author:
Hiroshige0
Posts: 114


1. Create a generic projectile with single-hit destruction and no bounce.
2. Add an emitter that emits a weaponized piece of forcefield (slowest speed possible) that's large enough so that the parent weapon can't miss it. Make it emit and destroy that piece for a fraction of a second (0.1).
3. Space that piece of forcefield just far enough that on the instant it is emitted, it impacts the parent projectile.

By doing this, you effectively exploit the parent weapon's destroy impact mechanic by emitting a surface directly in front (or in some cases, between the project as it passes by), causing the weapon to explode. There's a lot of timing involved to account for your parent projectile's speed as opposed to the obstacle it generates, but it worked out pretty sweet for me.

This is brilliant. Thanks, I'll give it a try!

EDIT:

Had to change it up a bit, but I got it as close as I could. Had to make the force field not a weapon, and the weapon would emit it as a stationary object and have it emitted a good ways ahead of the object. Otherwise the weapons would pass through each other or the original weapon would pass the spawn point before the object was fully formed or something like that. That's my theory.

It still misses sometimes, but it's close enough without being broken.
2013-09-21 18:56:00

Author:
StJimmysAdiction
Posts: 388


That's good to hear! It's a real pain to get it right, but it does make for some cool effects.2013-09-23 20:39:00

Author:
Hiroshige0
Posts: 114


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.