3D floors and setlinespecial
Moderator: Graf Zahl
- justin023
- Posts: 165
- Joined: Wed Sep 21, 2005 10:51
- Location: Illinois
- Contact:
3D floors and setlinespecial
I would like to be able to create 3d floors in real time using setlinespecial. I would also be able to make the floors fade in and out if I could do this.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- justin023
- Posts: 165
- Joined: Wed Sep 21, 2005 10:51
- Location: Illinois
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- BetaSword
- Posts: 132
- Joined: Thu Sep 01, 2005 0:01
Hrmm... Well, the effect I was trying to create was several 3D floors on top of each other, no spaces inbetween, with their walls scrolling at different speeds, to create a sort of parallax moving effect. The only way I can seem to get the walls to scroll is by setting a wall scrolling special on the line inside the area that the player's in, since the lines of the control sectors for the 3D floors are used for setting the 3D floor...
I'll show an example with a test wad. Basically, the room you start in shows it with all the 3D floors set up to create the "wall", but without the correct scrolling. Noclip into the room to the left of the starting point and look at the ceiling to see what I'd like the effect to be, with the different speeds for each "section" of the wall, created by the 3D floors.
I'll show an example with a test wad. Basically, the room you start in shows it with all the 3D floors set up to create the "wall", but without the correct scrolling. Noclip into the room to the left of the starting point and look at the ceiling to see what I'd like the effect to be, with the different speeds for each "section" of the wall, created by the 3D floors.
- Attachments
-
- MMZtest.zip
- (12.39 KiB) Downloaded 102 times
- justin023
- Posts: 165
- Joined: Wed Sep 21, 2005 10:51
- Location: Illinois
- Contact:
I did it the other way around actually, using multiple floors to create a fade effect. I noticed this script worked fine:
[spoiler][/spoiler]
While this script caused the floors to mess up when fading out:
[spoiler][/spoiler]
[spoiler]
Code: Select all
script 8 (int way)
{
setlineblocking(5, block_creatures);
if (way==0)
{
for (int i=0;i<8;i++)
{
floor_lowerinstant(ice[i], 0, 64);
ceiling_lowerinstant(ice[i], 0, 64);
if (i!=7) delay(35);
}
}
else
{
for (i=7;i>-1;i--)
{
ceiling_raiseinstant(ice[i], 0, 64);
floor_raiseinstant(ice[i], 0, 64);
if (i!=0) delay(35);
}
}
setlineblocking(5, block_nothing);
}
While this script caused the floors to mess up when fading out:
[spoiler]
Code: Select all
script 8 (int way)
{
setlineblocking(5, block_creatures);
if (way==0)
{
for (int i=0;i<8;i++)
{
floor_lowerinstant(ice[i], 0, 64);
ceiling_lowerinstant(ice[i], 0, 64);
if (i!=7) delay(35);
}
}
else
{
for (i=7;i>-1;i--)
{
floor_raiseinstant(ice[i], 0, 64);
ceiling_raiseinstant(ice[i], 0, 64);
if (i!=0) delay(35);
}
}
setlineblocking(5, block_nothing);
}
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- BetaSword
- Posts: 132
- Joined: Thu Sep 01, 2005 0:01
Ooh, possible idea:
The 3D floor special only uses 4 of the 5 arguments. Why not make the fifth argument an optional Line ID, with the same effect as the Set Line Identification special? As it is, the flat surfaces (floors and ceilings) of the 3D floors can be altered just like normal floors and ceilings, but the walls can't. This would allow changes to the walls as well. Of course, I don't know if this is workable or not, but it would be nice. I can't imagine that fifth argument being used for much else...
The 3D floor special only uses 4 of the 5 arguments. Why not make the fifth argument an optional Line ID, with the same effect as the Set Line Identification special? As it is, the flat surfaces (floors and ceilings) of the 3D floors can be altered just like normal floors and ceilings, but the walls can't. This would allow changes to the walls as well. Of course, I don't know if this is workable or not, but it would be nice. I can't imagine that fifth argument being used for much else...
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
No. It uses all 5 arguments. The last one serves as the high byte of the tag. This hasn't been documented though.
But since I see the need to assign a line ID to such a linedef there's another suggestion:
I am adding another flag bit to the second arg that defines the behavior of the fifth arg:
If bit 3 (value
is not set the fifth arg is the high byte of the tag, otherwise it defines a line ID.
But since I see the need to assign a line ID to such a linedef there's another suggestion:
I am adding another flag bit to the second arg that defines the behavior of the fifth arg:
If bit 3 (value

- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
@Enjay:
From the documentation thread:
From the documentation thread:
flags:
*1: disables any lighting effects created by this 3D-floor. Normally the 3D floor transfers the lighting properties of its model sector into the area below it.
*2: restricts the lighting properties into the area between the 3D floor's top and bottom. Logically this is only useful if the 3D floor is not solid.
*4: 'fog' effect. This is not real fog though, it just draws some translucent colored polygons on the outside of the 3D-floor.
*8: Ignores the bottom height of the model sector and draws top and bottom of the 3D floor at the model sector's ceiling height
*16: Uses a sidedef's upper texture to draw the sides of the 3D floor instead of the transfer linedef's mid texture.
*32: Uses a sidedef's lower texture to draw the sides of the 3D floor instead of the transfer linedef's mid texture.

- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Ahh, I read those instructions but actually misread and misinterpreted them. I see how it works now. Thanks.
@BetaSword, it looks like you are misreading it in the same way as I was. It sounds like you are describing my question exactly, but the instructions Shinjanji posted allow you to do just that - have a different texture on each side of a 3D floor.
You put the texture you want on the 3D floor side onto the upper (or lower) of the "container" sector lindefs and use flag 16 or 32 on the 160 line. The textures on the upper (lower) then get transferred to the 3D floor sides.
@BetaSword, it looks like you are misreading it in the same way as I was. It sounds like you are describing my question exactly, but the instructions Shinjanji posted allow you to do just that - have a different texture on each side of a 3D floor.
You put the texture you want on the 3D floor side onto the upper (or lower) of the "container" sector lindefs and use flag 16 or 32 on the 160 line. The textures on the upper (lower) then get transferred to the 3D floor sides.