Author Topic: Spawning projectiles from explosions  (Read 1524 times)

How would you do this?

All i want to know is how to edit how the explosion works, like making multiple entities/objects radiating from an explosion. I dont know really how to spawn a projectile, but im sure if i study gun scripts long enough ill find out. Also, is making a particle come out of an explosion simalar to this, and can you check if a particle/sprite collides with player, that will do dammage?

Thanks for the help,
Pooterin/AffGuy
« Last Edit: November 08, 2008, 10:20:08 AM by AffGuy »

How would you do this?

All i want to know is how to edit how the explosion works, like making multiple entities/objects radiating from an explosion. I dont know really how to spawn a projectile, but im sure if i study gun scripts long enough ill find out. Also, is making a particle come out of an explosion simalarto this, and can you check if a particle/sprite collides with player, that will do dammage?

Thanks for the help,
Pooterin/AffGuy

Just use empty.dts and your particle.


Can you make collision checks with particles?

Just use empty.dts and your particle.


I mean i want to make shrapnel come out of the a grenade blast like in real llife. should i just make a shrapnel particle or a .dts model come out from the blast and how would i edit how much each shard does.

Also, where should i use those?
« Last Edit: November 08, 2008, 10:21:04 AM by AffGuy »

Ive never done it before, but what if you change the explosion debris to a projectile datablock?

Ive never done it before, but what if you change the explosion debris to a projectile datablock?

Doesn't work.

While we're on the subject of debris, I'd like to voice a few problems with them. Debris are missing a few inherent commands that make them allot less awesome then they should be, like no explodeOnDeath (Explodes when lifetime runs out, seriously why the forget don't they have this?) or Damage stuffs (minor detail). I know these can be added by simply scripting in the functions, but for guys like me that still don't "get" in-depth scripting it's impossible.

On the good side, debris can hold up to 2 emitters (projectiles can only get 1 emitter). They can also be given some physics stuffs, and you can combine them with multiple subExplosions to make ridiculously awesome explosions. You can also assign them either a 2D mesh or a 3D mesh if I remember correctly.

If you want a better look at debris, look at Badspot's new Tank vehicle. Right now it's the only released object in Blockland that uses any sort of debris.

The Jeep explosion and Gravity Rocket use debris too, I believe.

The Jeep explosion and Gravity Rocket use debris too, I believe.

Oh yeah, you're right

Code: [Select]
// Explosion
////////////
datablock ExplosionData(jeepExplosion : vehicleExplosion)
{
   debris = jeepTireDebris;
   debrisNum = 4;
   debrisNumVariance = 0;
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisThetaMin = 40;
   debrisThetaMax = 85;
   debrisVelocity = 14;
   debrisVelocityVariance = 3;
};

Ok, well the Tank is the first one to utilize debris in a projectile-made explosion :P

Edit: Also Gravity Rocket doesn't appear to use any debris
« Last Edit: November 08, 2008, 01:33:22 PM by Muffinmix »

Oh yeah, you're right

Code: [Select]
// Explosion
////////////
datablock ExplosionData(jeepExplosion : vehicleExplosion)
{
   debris = jeepTireDebris;
   debrisNum = 4;
   debrisNumVariance = 0;
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisThetaMin = 40;
   debrisThetaMax = 85;
   debrisVelocity = 14;
   debrisVelocityVariance = 3;
};

Ok, well the Tank is the first one to utilize debris in a projectile-made explosion :P

Edit: Also Gravity Rocket doesn't appear to use any debris

I made the tank shell explosion, the debris was just a method for me to get the random strings of fire coming out of the main explosion.

Edit: Also Gravity Rocket doesn't appear to use any debris
Oh, right - the Gravity Rocket and Tank Shell explosions looked very similar so I assumed they both had debris.

I made the tank shell explosion, the debris was just a method for me to get the random strings of fire coming out of the main explosion.
The first time I saw the tank promo video I recognized the debris immediately. It made me very happy to see them finally utilized in blockland at the time, although I forgot the jeep also used debris.

Oh well, that and subExplosions could make very fancy explosions. I just need to figure out how to get the debris to explode when their life time runs out.

Hmm, I ma going to do some testing.