Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
ChaosOverlord

impassible windows with transparent textures (glass effect)

Recommended Posts

is it possible to make the windows with transparent textures (to create a glass like effect) impassible, so that even projectiles cannot pass through them? i tried raising the floor level of the sector, and setting the lower textures for the glass, but that didn't work.. has anyone else figured anything out?

Share this post


Link to post

just to give you an idea of what I am trying to achieve, here is an example:


|-----|-|-|-|-----|
| | | | | |
| A |B|C|B| A |
| | | | | |
|-----|-|-|-|-----|

A - The sectors marked "A" have a floor height of "0" and
a ceiling height of "128" and are the sectors that you
can move around freely in.
B - The sectors marked "B" have a floor height of "32" and
a ceiling height of "64" and somewhat define the window.
C - The Sectors marked "C" have a floor height of "32" and
a ceiling height of "64" and make the window itself..

Each linedef of "C" that connects with the "B" sectors contains the Transparency special and therefore create the window effect.. now how do I make it so that you can't shoot through this window.. or is there even a way to do that?

Share this post


Link to post

let's try that one again (sorry for all the -'s, but I had to use them as place holders.. ignore them, except for the outer lines (defining the sectors)):

|-----|-|-|-|-----|
|-----|-|-|-|-----|
|--A- |B|C|B|--A--|
|-----|-|-|-|-----|
|-----|-|-|-|-----|

A - The sectors marked "A" have a floor height of "0" and
a ceiling height of "128" and are the sectors that you
can move around freely in.
B - The sectors marked "B" have a floor height of "32" and
a ceiling height of "64" and somewhat define the window.
C - The Sectors marked "C" have a floor height of "32" and
a ceiling height of "64" and make the window itself..

Each linedef of "C" that connects with the "B" sectors contains the Transparency special and therefore create the window effect.. now how do I make it so that you can't shoot through this window.. or is there even a way to do that?

Share this post


Link to post

let's try that one again (sorry for all the -'s, but I had to use them as place holders.. ignore them, except for the outer lines (defining the sectors)):

|-----|-|-|-|-----|
|-----|-|-|-|-----|
|--A--|B|C|B|--A--|
|-----|-|-|-|-----|
|-----|-|-|-|-----|

A - The sectors marked "A" have a floor height of "0" and
a ceiling height of "128" and are the sectors that you
can move around freely in.
B - The sectors marked "B" have a floor height of "32" and
a ceiling height of "64" and somewhat define the window.
C - The Sectors marked "C" have a floor height of "32" and
a ceiling height of "64" and make the window itself..

Each linedef of "C" that connects with the "B" sectors contains the Transparency special and therefore create the window effect.. now how do I make it so that you can't shoot through this window.. or is there even a way to do that?

Share this post


Link to post

errr... this sucks... just take the center of that map and shift everything to the left just a bit, and that's how it would look... sorry all... but i could still use some help, if you've got any ideas...

Share this post


Link to post
Guest Fanatic

Do what you have now, just put a self-referencing sector in the middle fo the glass. That will block rockets and whatnot, but still be transparent.

See the transparent door effect on the DOOM World editing section.

Share this post


Link to post

In your other thread, you mentioned sliding doors. Assuming that means you are using Zdoom in ZdoomHexen mode, you can create a totally impassible, tranlucent line using a simple open script.

Just make the line that you want to be your window (a 2 sided lindef) a type 121 (a line identify type line) and give it a line ID as its first argument.

Then use the following in an open script:

Setlineblocking(100,BLOCK_EVERYTHING);
TranslucentLine(100,96);

This sets Line 100 to block everything (duh). That means it also blocks projectiles and bullet type shots, unlike the normal impassible flag which lets those things through.

The TranlucentLine statement gives the line a tranlucency of 96, which can make something like shawn2 look quite window like, but I recommend using your own texture.

If you do it this way, you can also set the line to be a projectile activated type and use the open script to set the line to run a script. That second script can then be used to "smash" the window by playing a sound that you have defined in SNDINFO, changing the texture to one that looks like a broken window and removing the blocking attribute of the line.

eg

Something like this would appear in your open script:

setlinespecial(100, 80, 1, 0, 0, 0, 0);

That makes line 100 a type 80 (run a script) and tells it to run script 1.

Then your window smashing script would be something like this:

script 1 (void)
{
SetLineSpecial(100,0,0,0,0,0); //Removes line special type
thingsound(100, "glass", 127); //makes the sound glass at map spot with tid 100
Setlineblocking(100,off); //Stops line 100 blocking things
setlinetexture(100, SIDE_FRONT, TEXTURE_MIDDLE, "SW2NJ33"); //Makes the front side look broken
setlinetexture(100, SIDE_BACK, TEXTURE_MIDDLE, "SW2NJ33"); //makes the back look broken
}

The SNDINFO entry to define the glass sound would look something like this:

GLASS DSGLASS //Glass smashing

I think that should work anyway. I'm no scripting expert, but that was cut and pasted from one of my own levels and it works there.

Oh, BTW, SW2NJ33 is just the name of a texture I used that looks like a broken window.

Share this post


Link to post

Yes, but there's a trick to it. You have to put an invisible barrier either right in front of or preferably right behind the window.

Look at this image.

The colors of the lines are drawn to match what they'd look like on the Doom automap. Everything that is shaded with colored pixels is a sector: the ones that are totally black aren't part of the level. The Cyan pixels (light-blue ones on the top and bottom) are your regular rooms. The area inbetween the top and bottom rooms will be your window. As you can see, it requires 3 sectors in the window-area to make this effect.

Let's say each room (cyan pixels) has a CEILING=128 and a FLOOR=0. The dark-brown walls on the top and bottom of this window area will be where you place the transparent window-textures.

Behind them, the sector with the blue pixels will have a CEILING=96 and a FLOOR=32. This will be the center of the window.

The next sector in, with the purple pixels, will have a CEILING=288 and a FLOOR=32.

Then finally, the last sector in the center will have a CEILING=288 and a FLOOR=287.

DO NOT TEXTURE ANY WALLS EXCEPT THE ONES WITH THE TRANSPARENT WINDOWS!!

What this does: if you leave the wall textures off the other inner sectors, Doom will cover them up with the ceilings and floors of the first sector, marked with the blue pixels. The center floor which is raised into the ceiling acts as the impassible barries, since the projectiles and bullets will be hitting a solid wall, even though the wall doesn't show.

Sorry for the bad explanation of how it works, but that's how it works.

Share this post


Link to post

...or, you could do one of those scripts...

(Heh, guess that's what I get for being so slow :P)

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×