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

[solved] Fence of specific height that can be shot through.

Recommended Posts

I want to make a fence that can't be walked through, but can be walked over, and can also be shot through. Image of the fence -
http://imgur.com/a/Ivbkj

I can't use "block player" flag, because you need to be able to jump over the fence from above. When I use a self referencing sector I can't shoot through it.

Is there a way to block player movement only to a certain height, but still allow bullets to pass through?

Thanks in advance for any help.

Share this post


Link to post

Maybe you could make it so that the fence is around 20-30 in height and, assuming, the player isn't using mlook, means that the player can shoot over the fence (since its height is below the player heights).

Theoretically.

Share this post


Link to post

Why not realizing a series of 4x4 columns, as high as the player, distance between them enough to display the fence texture but not enough to walk for the player? You could shoot through it, walk over but still stop the player.

Share this post


Link to post

I had an idea for it, which would work but wouldn't allow you to shoot through it.

Basically the idea is to make a line in which you put the midtexture (the fence) and then right behind or in front of the fence, you put a 1 unit long sector and however many units wide to span the length of the fence.

Raise the 1 unit sector up tall enough to meet with the top of the fence midtexture. Leave the sidedefs of this sector untextured and you will have a see-through invisible wall that's only as tall as you make it to be.

The only downside is there will be a very thin strip of whatever flat you gave the sector and of course the fact you can't shoot through it. If it's close enough to the fence and has a similar color, many players might not notice it during casual play.

Share this post


Link to post
Angry Saint said:

Why not realizing a series of 4x4 columns, as high as the player, distance between them enough to display the fence texture but not enough to walk for the player? You could shoot through it,

But only if you managed to shoot between the 4x4 columns, not hitting the columns themselves, which (hitting the columns) would happen more likely than not, statistically, and even more likely if you were shooting through the fence under an angle, instead of straight orthogonally against it.

Share this post


Link to post

For anybody who likes to map in Boom format, there is a way you can fake this (with a small caveat) so that you don't have to use 3dmidtex that I'll explain below, because more knowledge never hurts. It's similar to Nevander's method but with a small trick. Nevander's trick also has rendering issues with flat bleeding if you are below the height of the raised sector while this does not.

If this is hard to follow, ]here is an example wad.

The minimum height a step can be so that the player cannot walk up it is 25 units. (When using the scroll wheel to raise floor height in 3D Visual mode in Doom Builder, that's 3 scrolls up followed by 1 shift+scroll up). Where you want the shootable fence to be, put a thin floor on the edge at least 25 units higher to where the player is. This stops the player walking through it but lets shots and projectiles travel over it.

Now add a midtexture to the edge of your raised floor and set the midtexture's height to where you want it to be. If you are pushing the midtexture below the floor, you can prevent a software rendering bug of having the texture be visible below the floor by changing the brightness of one of the sectors on either side to be different to the other, even if it is a single point of brightness.

The final step is to make your small raised sector invisible. Line action 242 Create Fake Ceiling and Floor will allow a tagged sector to be drawn as though it were a different sector. Give your raised sector a tag, then create a dummy sector with flats, brightness and floor and ceiling height of what you want it to look like. Then put action 242 on one of the lines of your dummy sector and give it the same tag as your raised sector. This will make your raised sector be drawn as though it had the properties of your dummy sector.

Note that you still have a physical blocking barrier 25 units high even though you can't see it, so e.g. standing next to it and trying to rocket downwards could cause issues. This can be worked around in your level design, but do keep it in mind. Same issue if you are below a ledge with this faked raised edge shooting upwards.

In my example wad I've made the midtexture appear at the same height as the invisible raised floor but there's nothing stopping you from raising the midtexture higher, it just means that things will move through the midtexture after a certain height..

Share this post


Link to post

Thank you all for your additional replies, but 3dmixtex ("Walkable middle texture"), is the perfect solution for my current problem. Perhaps I wasn't clear enough in my previous post.

Voros and Melon, your solutions don't work because you can jump from above. If you couldn't jump from above it would be much easier to just use the "Block players" tag.

Nevander, sounds like you're basically describing what I tried with a self referencing sector, and doesn't solve the problem, because you can't shoot through it.

Angry Saint, your solution is interesting but inelegant, and not being able to shoot through it is part of what I was trying to fix.

Melon, thanks for adding a solution for boom mapping people, but I haven't tried your solution because I don't need to.

Share this post


Link to post
scifista42 said:

But only if you managed to shoot between the 4x4 columns, not hitting the columns themselves, which (hitting the columns) would happen more likely than not, statistically, and even more likely if you were shooting through the fence under an angle, instead of straight orthogonally against it.


If you have a column large 4 and a space between columns of... I don't remember the player width, 40? 48?, statistically you are more likely to hit the space in between than the column itself.

And this would also be more realistic.

Share this post


Link to post
Angry Saint said:

I don't remember the player width, 40? 48?

His radius is 16, therefore his diameter/width is 32, so the distance between columns would have to be at most 31 to be reliable. But projectiles also have a non-negligible width, ranging from 6 to 13, which would make them hit the bars often. So well, hitscans fired towards the fence would statistically pass through more likely than not, but still, the probability would decrease if they were fired under a lesser than 90-degree angle against the fence.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×