Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Skully Boots

Explosive Railgun

Question

I would like to make a simple railgun that explodes on impact with blast radius and explosion animation, similar to Brutal Doom's railgun. How could I go about doing that? I've tried making a fake rocket that travels very fast to give the illusion that the railgun caused an explosion, but for some reason it won't detonate at the same spot as the rail hits or not detonate at all if hitting a surface at an angle. Any suggestions?

 

IMG_20190206_172939_HDR.jpg

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

Play the explosion sound with A_PlaySound right before the first spawn frame (which gets jumped over if you don't use the NODELAY attribute!)

A_Explode needs some parameters to work right, namely damage and radius. Check the zDoom wiki.

 

Spawn:
TNT1 A 0 NODELAY A_PlaySound("Explosionsound", CHAN_AUTO)
MISL B 8 BRIGHT A_Explode(20, 128)
...

 

Share this post


Link to post
  • 1

Give your rail attack a custom puff inheriting from BulletPuff that has +ALWAYSPUFF and +PUFFONACTORS and very importantly, +PUFFGETSOWNER, so you get credit for the kill.

Share this post


Link to post
  • 0
22 minutes ago, Empyre said:

Give your rail attack a custom puff inheriting from BulletPuff that has +ALWAYSPUFF and +PUFFONACTORS and very importantly, +PUFFGETSOWNER, so you get credit for the kill.

Okay so here's what I've got so far. I don't know how to get the explosion sound to work and A_Explode doesn't do anything. Am I doing this right? Am I forgetting something?

IMG_20190206_181029_HDR.jpg

Share this post


Link to post
  • 0
12 minutes ago, Cherno said:

Play the explosion sound with A_PlaySound right before the first spawn frame (which gets jumped over if you don't use the NODELAY attribute!)

A_Explode needs some parameters to work right, namely damage and radius. Check the zDoom wiki.

 


Spawn:
TNT1 A 0 NODELAY A_PlaySound("Explosionsound", CHAN_AUTO)
MISL B 8 BRIGHT A_Explode(20, 128)
...

 

It works! Thank you so much! :D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×