Page 1 of 1

How to create an explosion (visual only) as an actor?

Posted: Wed May 04, 2022 8:54 pm
by Guest
I need to create an explosion for an effect, to be triggered by a script. I tried editing the decorate for the rocket and the explosive barrel, but they didnt work (I know nothing about decorate). Is there, maybe, something I can download? Tried realm667, but there's nothing like that.
Is it possible?
Thanks.

Re: How to create an explosion (visual only) as an actor?

Posted: Thu May 05, 2022 11:57 am
by RKD
While waiting for more experienced users in this matter, this would be my simple take on a decorate definition of a purely aesthetical explosion, based of the glitter effect of heretic teleports and the frames of doom rocket explosion:

Code: Select all

ACTOR DecorativeExplosion
{
  +NOBLOCKMAP
  +NOGRAVITY
  States
  {
    Spawn:
      MISL B 8 Bright
      MISL C 6 Bright
      MISL D 4 Bright
    Stop
  }
}
To call the explosion it would require either ACS Script (Something happens, explosion appears) or a Thing_Spawn function on a linedef, maybe, depending on how you want this stuff to happen. "MISL" is the default name of the rocket sprites in Doom, so if you want to use custom sprites with a different name you have to change those lines to make the code look for those new sprites instead. In any case, the wiki really is your best friend™ in these regards.

Re: How to create an explosion (visual only) as an actor?

Posted: Fri May 06, 2022 4:29 am
by Fragger
Thanks. I got something similar, but i couldn't get it to make a sound. Basically, i removed some frames from the rocket, so.it would display the death animation, but I couldnt get it to make a sound.

Re: How to create an explosion (visual only) as an actor?

Posted: Fri May 06, 2022 11:55 am
by RKD
It won't make a sound because is not calling any sound whatsoever in the definition. Depending on the format of the project (.wad or .pk3) and the base wad (doom, heretic, etc), it may vary how you need to approach that addition. I'll use the default rocket explosion sound assuming it's a mod for doom/doom2 for this example:
Spoiler: Method 1 [url=https://zdoom.org/wiki/A_Scream
Spoiler: Method 2 [url=https://zdoom.org/wiki/A_PlaySound
To be clear, in doom.wad the actual sound is called DSBAREXP:
explosion.jpg
GZDoom defines it as weapons/rocklx (for ease of use, I presume):
gzdoom sndinfo.jpg
So, in order to call "weapons/rocklx" you have to make sure you are loading gzdoom.pk3 as a resource in your map editor (in UDB, for example). Exclude it from testing parameters, though.