Author Topic: How do I make a projectile explode into shrapnel?  (Read 1135 times)

I want a projectile to split into multiple different projectiles on impact.

I skimmed across the code for the frag grenade, nothing.
I searched and got 1 result that didn't even help.
How do I do this?

take the code that handles the frag grenade explosion, and put it under Projectile::onCollide Projectile::onCollision or Projectile::onExplode. I can probably help you out over PM if that doesn't work, but i'll bet someone else will post here with more concrete code by then.
« Last Edit: March 01, 2016, 06:29:15 AM by Conan »

I can probably help you out over PM if that doesn't work.
Actually I lost my ability to PM because MoltenKitten couldn't take a joke.
I'll try this, though.

Actually I lost my ability to PM because MoltenKitten couldn't take a joke.
I'll try this, though.
Add me on steam, im Conan Buchanan. You can find relevant code on how to work these functions (aka what parameters they take in and what they mean) in the Prop Tool addon, under propcmds.cs at the bottom.

For these functions, you need to return the parent, not just run it, if you're not overriding it completely. keep that in mind.
« Last Edit: March 01, 2016, 06:30:54 AM by Conan »

It worked, thanks.
Now I just have to figure out if I should release it...