Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Maisth

Create explosions and holes like Duke3D

Recommended Posts

How do i make Explosions like Duke Nukem 3D Ones? im pretty sure it requires scripting and also how do i make holes in a wall? do i use 3D Sectors floor for that?

Share this post


Link to post

There's a few ways you could do it.

 

One way is to use 3D floors like you suggested and use a 3D floor to fill gaps in a wall. Upon explosion, remove the line special in your control sector to remove the 3D floor and expose the hole.

 

Another way is to build a hole in a wall and then make the upper and lower textures unpegged so the textures don't move. Move the hole's floors up to the ceilings of the hole and then upon detonation, instantly lower them to the desired heights to create said hole. In fact, I'm pretty sure this is how Duke 3D did it. Areas of the map that move or change to open holes, but it happens instantly.

Share this post


Link to post
3 minutes ago, Nevander said:

There's a few ways you could do it.

 

One way is to use 3D floors like you suggested and use a 3D floor to fill gaps in a wall. Upon explosion, remove the line special in your control sector to remove the 3D floor and expose the hole.

 

Another way is to build a hole in a wall and then make the upper and lower textures unpegged so the textures don't move. Move the hole's floors up to the ceilings of the hole and then upon detonation, instantly lower them to the desired heights to create said hole. In fact, I'm pretty sure this is how Duke 3D did it. Areas of the map that move or change to open holes, but it happens instantly.

Right we got that out of the way. but how do i recreate the explosion? putting barrels behind the wall where the player can't see them? or another thing

Share this post


Link to post

Create a new actor in DECORATE which is just the explosion sprites from the rocket or something. Spawn these things while your explosion should happen. In random MapSpots around the hole. You can use a for loop to spawn the explosion actors in random places by doing a range of the MapSpots for the spawn function TIDs.

Share this post


Link to post
7 hours ago, Nevander said:

remove the line special in your control sector to remove the 3D floor

That will not work, since the line special is static (it initializes a 3D floor upon map startup, then becomes useless), but there are other ways to make a 3D floor disappear (at least by moving the control sector's floor/ceiling to move the 3D floor up/down).

Share this post


Link to post

Make the hole in normal geometry (protip: use slopes) and make the area occupied by the 3D floor slightly larger than the hole to avoid Z-fighting. Basically the 3D floor should be the entire "intact" wall and it should be sticking one unit away from the damaged wall inside. When the wall is destroyed, spawn a lot of explosions and debris and dust clouds and instantly lower the intact wall below the floor. 

Share this post


Link to post

The method that I use is similar to Gez's suggestion - create a hole in the wall and use slopes if desired. Then, cover up the hole with a linedef that is 1 unit in front of the real wall. The mid-texture of the linedef should be the same as the wall behind. Assign a line ID to the linedef using Line_SetID. Either make the linedef blocking or use an OPEN script with Line_SetBlocking. The script that triggers the explosion should also remove the texture and blocking of the linedef.

 

I first started using this method nearly 10 years ago, but I think Gez's method is simpler to implement.

 

EDIT: One point of note - my method does not require any 3D sectors, whether in the hole or outside. I'm simply mentioning this, and not stating this as any sort of advantage.

Share this post


Link to post

True, there's no need to bring in 3D floors. At first I thought about using one to plug the hole, but then I worried about Z-fighting and made it stick out, and once you do that it could also be a regular sector that instant-lower from the ceiling (or instant raise from the floor, would work too). There are a lot of ways to do it.

Share this post


Link to post
11 hours ago, scifista42 said:

That will not work, since the line special is static (it initializes a 3D floor upon map startup, then becomes useless), but there are other ways to make a 3D floor disappear (at least by moving the control sector's floor/ceiling to move the 3D floor up/down).

Damn. Does that also mean you can't create one mid-map by doing SetLineSpecial? That's kinda bummer.

Share this post


Link to post
10 minutes ago, Nevander said:

Damn. Does that also mean you can't create one mid-map by doing SetLineSpecial? That's kinda bummer.

 

Fun stuff: you can with Eternity's linked portals. So you can destroy a floor and fall into a room below, or re-assert a floor to close a gap.

Share this post


Link to post
31 minutes ago, Nevander said:

Damn. Does that also mean you can't create one mid-map by doing SetLineSpecial? That's kinda bummer.

You can perfectly well have your 3D floor start below the map, and then move it up (including with an instant move so it seems to appear out of thin air) at some point.

Share this post


Link to post

Are 3D floors not subject to the rule of floors and ceilings never entering each other? I suppose not since the control sector is what moves and since it's in void space, it can keep going.

Share this post


Link to post

There's no rule like that (you can definitely lower a ceiling below its floor), and even if there were, 3D floors wouldn't be bound by them given how they work.

Share this post


Link to post
9 hours ago, Nevander said:

Are 3D floors not subject to the rule of floors and ceilings never entering each other?

The actual rule is that things (like players, monsters or items) can't exist below the floor or above the ceiling of the sector they're in, but floors themselves generally can exist above the ceilings of their own sectors, and ceilings can exist below floors in the same way, and some (even vanilla compatible) mapping tricks exploit that.

Share this post


Link to post

Then something is wrong because I tried to do that in my maps in UDMF format and the rising floor would always stop at the meeting ceiling even if I scripted it to go higher with ACS.

Share this post


Link to post

Were there any things on the floor that could be blocking it?

 

EDIT: Indeed, the standard action specials for floor/ceiling movement apparently don't allow regular floors and ceilings to move into each other. The map can start with regular floors and ceilings already inside each other, though, if you set floor height to be above ceiling height in the map editor, and such floors and ceilings can be moved away from each other (that's the principle of the vanilla compatible tricks I mentioned earlier). The action specials also successfully move 3D floors through floors and ceilings, as suggested in this thread. I don't know how to do that with only regular floors and ceilings, though.

Edited by scifista42

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
×