Explosions
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Explosions
alright, im new at scripting with Zdoom, but i still know a little bit =), and im wondering, how could you make a good explosion? like not as big as when you destroy the final boss but maybe half that size? any help is apreciated. (i saw something like this on the old forums but that was b4 i had zdoom in WA and by that time the old forums were down =(
Zell
Zell
Ack, I'm missing the info from the old forum. On there I requested a spawnable explosion item but I can't remember if it was implemented of not. I remember I went back and edited a few of my maps shortly afterwards, so maybe, or maybe I made one using dehacked or possibly a Hexen item?
Anyway, the traditional way to do it is to spawn a rocket near a wall and have it hit the wall. A little clumsy, which is why I requested a spawnable explosion.
The reason the explosion has the same sprite name as the rocket is because they are the rocket explosiong sprites.
Anyway, the traditional way to do it is to spawn a rocket near a wall and have it hit the wall. A little clumsy, which is why I requested a spawnable explosion.
The reason the explosion has the same sprite name as the rocket is because they are the rocket explosiong sprites.
Yeah, but they're used elsewhere, like mancubus fireball explosion and the explosion sequence of the end boss.Enjay wrote:The reason the explosion has the same sprite name as the rocket is because they are the rocket explosiong sprites.
EDIT: I'm so stupid. The mancubus and end boss were in doom2. The rocket and it's explosion were made before them. My brain is messed up today. Maybe this will help me:
-
- Posts: 272
- Joined: Tue Jul 15, 2003 5:48 pm
- Location: Chesterfield, Missouri
Uh ohXaser wrote:Maybe this will help me: *Angry smilie*
NOW look what I've done with all the mess I caused here
I've made some reasonable explosions for someone who wanted a "land mine" section for his wad. I put some map spots here and there, then wrote a script to make an explosion at one of the map spots. It was pretty simple and worked well. Spawn a rocket just above the ground, using a fairly large -z velocity. The explosion is essentially instant with the script execution. The script also caused a very short earthquake jolt at the same map spot so you could "feel" the explosion. Also, for eye candy, the script spawned a little spray of imp fireballs up from that map spot, random angle, horizontal and vertical velocities within a range which looked good. You might even spawn an archvile flame after the explosion for longer-lasting pleasure.
If you wanted a mid-air explosion and that spawnable explosion Enjay mentioned isn't available, you might be able to spawn a rocket in the air, perhaps no velocity, assign it a TID as it's spawned, then follow that with a thing_destroy script to act on the spawned rocket. Follow Cyb/Timmie's example to generate a spherical spray of fireballs or whatever favorite projectiles you wish.
Edit: Tried it, there were a few little problems. It seems invalid to assign a TID to a rocket in flight, or that thing_destroy is not valid when acting on a rocket in flight. A rocket "ready to explode" can be spawned with thing_projectile, but it can't be acted upon by thing_destroy AFAIK. So, just put an invisible bridge thing in the same place as the map spot which you use for thing_projectile and the rocket will explode instantly. You don't even need to assign any velociy to the rocket, it explodes immediately upon "telefragging" the bridge thing.
I also tried it with an exploding barrel because those can be assigned a TID when spawned, and destroyed by script. Problem is, the barrel wants to fall. If you write a dehacked patch to make it float, it will do so but when destroyed it falls to the ground and does not look like a mid-air explosion. So I'd use a rocket to start unless the spawnable explosion is available.
If you wanted a mid-air explosion and that spawnable explosion Enjay mentioned isn't available, you might be able to spawn a rocket in the air, perhaps no velocity, assign it a TID as it's spawned, then follow that with a thing_destroy script to act on the spawned rocket. Follow Cyb/Timmie's example to generate a spherical spray of fireballs or whatever favorite projectiles you wish.
Edit: Tried it, there were a few little problems. It seems invalid to assign a TID to a rocket in flight, or that thing_destroy is not valid when acting on a rocket in flight. A rocket "ready to explode" can be spawned with thing_projectile, but it can't be acted upon by thing_destroy AFAIK. So, just put an invisible bridge thing in the same place as the map spot which you use for thing_projectile and the rocket will explode instantly. You don't even need to assign any velociy to the rocket, it explodes immediately upon "telefragging" the bridge thing.
I also tried it with an exploding barrel because those can be assigned a TID when spawned, and destroyed by script. Problem is, the barrel wants to fall. If you write a dehacked patch to make it float, it will do so but when destroyed it falls to the ground and does not look like a mid-air explosion. So I'd use a rocket to start unless the spawnable explosion is available.