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

Texture Scrolling Prob In ZDoom

Recommended Posts

I was stuffing around with texture scrolling before...I want to make a texture scroll up and down, when pressing a switch.

Just to try and get it working to start with, I wrote this script:

#include "zcommon.acs"

script 1 OPEN
{
TranslucentLine (1, 128);
Scroll_Texture_Both (-1, 50, 0, 0, 0);
}

The texture scrolls through the floor and disappears? It's supposed to do that? I didn't think you could use Scroll_Texture_Down, cause it has no parameter for lineid (I mean, no where to put it)...

So...I thought it would scroll like a waterfall, and not just move the texture down through the floor :P

Mind you this is on a 2 sided linedef, is that the problem? But this is what I want it for...anyhow, can someone explain?

Share this post


Link to post
mmnpsrsoskl said:

Mind you this is on a 2 sided linedef, is that the problem? But this is what I want it for...anyhow, can someone explain?

I can't check right now, but I guess it is because you're using a 2-sided line.

Share this post


Link to post

Indeed, textures on the middle of a 2 sided line are drawn differently to how they are on a 1s line. They are drawn once, and do not tile. Moving them up and down will simply move the one texture higher or lower.

Share this post


Link to post

Ah. I see.

That explains things :P

And presents a problem...I'm not really worried that it only tiles once, but that you can still see the texture even through the floor :(

Share this post


Link to post
mmnpsrsoskl said:

And presents a problem...I'm not really worried that it only tiles once, but that you can still see the texture even through the floor :(

IIRC you can fix that problem easily: Create a new sector where you want the scrolling texture to be on and give this sector a different light level. The difference can be as low as 1 unit. The texture should not be shown in the floor then (it will be cut off).

Share this post


Link to post
mmnpsrsoskl said:

Thanks!

It worked :P

Now, I really need to get this thing working :P

I wonder why it does that?


That has to do with the way the Doom engine renders floors and ceilings. Way back when before the source release you always had to worry about something called a VPO which occured when too many different sectors were in view by the player (the limit was 128 I believe). Lee Killough, who programmed much of Boom and later MBF (which is what SMMU and now Eternity are based upon), figured out that for something to be a different visplane the sector properties could not match. So, two sectors next to each other with the same texture, light level and height are rendered as the same visplane by Doom. Also obviously a floor and a ceiling are two visplanes.

So, by changing the properties slightly of one of the sectors the 2s linedef is on, Doom now renders those as two different sectors and the 2s middle texture is treated as if it belongs in only one of those sectors, rather than belonging to both.

Of course I may be off, but I'm pretty sure that's what's going on.

- Cyb

Share this post


Link to post

Ah, thanks Cyb.

I knew that 2s walls were drawn that way, and knew how to get the textures to cut off at floor/ceiling level, but didn't know why it worked.

Now I do. :-)

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
Sign in to follow this  
×