Grenade that Explodes Multiple Times
Grenade that Explodes Multiple Times
I'd like to make a thrown grenade (projectile) that explodes 10 times before disappearing.
Does anyone have any ideas how I can pull this off? It's been on my mind but I can't figure out how to do it without throwing 10 separate grenades that explode at different times.
Does anyone have any ideas how I can pull this off? It's been on my mind but I can't figure out how to do it without throwing 10 separate grenades that explode at different times.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Re: Grenade that Explodes Multiple Times
Create 10 different with different explode times, then fire them all using the method Apache thunder figured out:
http://bfmods.com/viewtopic.php?f=6&t=1664
http://bfmods.com/viewtopic.php?f=6&t=1664
Walk quietly and carry a sniper rifle
Re: Grenade that Explodes Multiple Times
That's actually what I'm trying to refrain from doing. I was asking if I can get a projectile (one projectile, not 10 of them) to explode ten times, or perhaps an infinite amount of times withing a set time frame.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: Grenade that Explodes Multiple Times
As far as I can tell, there is no way to have a projectile detonate or explode multiple times. Once it explodes, that's it. You could have it spawn a PCO copy of the grenade as part of the explosion effect, but unfortunately I have found this to cause CTDs in multiplayer testing. Seems PCOs can't be spawned via the damage system at all without trouble being caused in multiplayer. 




I have cameras in your head!
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: Grenade that Explodes Multiple Times
I have an idea, but there would be trouble getting the first fire to work. There would be an... object... (a bundle, most likely) fired out of the fire arm, and the projectile has 10 fire arm bundles on it that have fire delays set to when they should detonate, and fire projectiles that instantly explode when spawned. The problem would be getting the autofire code to start immediately after spawn. 

A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Re: Grenade that Explodes Multiple Times
Okay, thanks for the feedback, I'll be trying some interesting things. How about this: you know that German rifle grenade from SWoWWII? I was thinking about making a panzershreck that fires six of those like a shotgun and they explode using random timing. Of course I'll need to make a weaker damage table for them or just make the reload really slow.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: Grenade that Explodes Multiple Times
in that case, make it a shotgun. 

A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
-
- Posts: 617
- Joined: Mon Oct 01, 2012 3:13 pm
- Location: Canada
- Contact:
Re: Grenade that Explodes Multiple Times
Nice thinking. Plus the Allied shotgun is in the same add-on as the Mauser K98 Rifle Grenade.Swaffy wrote:Okay, thanks for the feedback, I'll be trying some interesting things. How about this: you know that German rifle grenade from SWoWWII? I was thinking about making a panzershreck that fires six of those like a shotgun and they explode using random timing. Of course I'll need to make a weaker damage table for them or just make the reload really slow.
See my Strasbourg map project here.
Re: Grenade that Explodes Multiple Times
Well, I already made some better working shotguns in my mod, I just have to use the same coding on the Panzershreck but with less FireArmsPosistions, then make a different texture (or die trying) with some extra weird stuff on the 3D model. Maybe make it look like some scrappy junk gun from Fallout New Vegas (since I've been wasting my life on that lately).
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: Grenade that Explodes Multiple Times
I think I actually have a solution.
I got it from lying on my bed thinking about how to make tanks when they die just have their turrets fly off. If you cannot see where I am going, I'll explain.
and, make sure you count up the bomb number to 9 (the 1st is fired from the gun), because if it emits its self when it dies, you got a endless explosion!
that maybe useful for other things to.
I have not tested this, but if the newer bombs don't wanna make effects because they are dead, make the bombs PCOs taking critical damage continuously.
it might work!!!!


Code: Select all
ObjectTemplate.create Emitter Em_Bomb1
ObjectTemplate.template Em_bomb2
ObjectTemplate.addEmitterSpeed 1
ObjectTemplate.emitterSpeedScale 1
ObjectTemplate.lodDistance 375
ObjectTemplate.timeToLive CRD_NONE/1/0/0
ObjectTemplate.intensity CRD_NONE/1/0/0
ObjectTemplate.relativePositionInDof CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInDof CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInUp CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInRight CRD_UNIFORM/0/0/0
ObjectTemplate.startRotation CRD_UNIFORM/0/0/0
ObjectTemplate.create bundle Bomb1
ObjectTemplate.addTemplate Em_Bomb1
(stuff that makes bombs go here)
ObjectTemplate.create Emitter Em_Bomb2
ObjectTemplate.template Em_bomb3
ObjectTemplate.addEmitterSpeed 1
ObjectTemplate.emitterSpeedScale 1
ObjectTemplate.lodDistance 375
ObjectTemplate.timeToLive CRD_NONE/1/0/0
ObjectTemplate.intensity CRD_NONE/1/0/0
ObjectTemplate.relativePositionInDof CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInDof CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInUp CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInRight CRD_UNIFORM/0/0/0
ObjectTemplate.startRotation CRD_UNIFORM/0/0/0
ObjectTemplate.create bundle Bomb2
ObjectTemplate.addTemplate Em_Bomb1
(stuff that makes bombs go here)
............

that maybe useful for other things to.
I have not tested this, but if the newer bombs don't wanna make effects because they are dead, make the bombs PCOs taking critical damage continuously.
it might work!!!!

A picture is worth a thousand words, but takes up three thousand times the memory.
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"