3D floors and setlinespecial

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
justin023
Posts: 165
Joined: Wed Sep 21, 2005 10:51
Location: Illinois
Contact:

3D floors and setlinespecial

Post by justin023 »

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.
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

I was actually going to ask the same thing, more along the lines of making the walls of the 3D floor scroll, though.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Dynamic 3D-floor generation - if implemented would not be as simple as setting a line special. There's some complex initialization involved in creating them. It'd be rather messy so I don't expect this to happen.

Scrolling textures can be achieved by scrolling the control sector/linedef.
User avatar
justin023
Posts: 165
Joined: Wed Sep 21, 2005 10:51
Location: Illinois
Contact:

Post by justin023 »

Dang. I had an idea for a cutscene where Hexen's iceguy would cause a pond (and the only exit) to freeze over. You would have to defeat them to continue onward. maybe I can achieve this another way.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Since you can freely move floor and ceiling of a 3D floor you can easily achieve this effect by defining the ice floor below the actual sector and then move it to its final position when the time comes.
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

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.
Attachments
MMZtest.zip
(12.39 KiB) Downloaded 102 times
User avatar
justin023
Posts: 165
Joined: Wed Sep 21, 2005 10:51
Location: Illinois
Contact:

Post by justin023 »

I did it the other way around actually, using multiple floors to create a fade effect. I noticed this script worked fine:

[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);
}
[/spoiler]

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);
}
[/spoiler]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

That's normal. You can't raise a floor above the ceiling. When raising a 3D-floor you have to do the ceiling first and then the floor.
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

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...
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

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 8) is not set the fifth arg is the high byte of the tag, otherwise it defines a line ID.
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

Oh yeah... I thought I heard about that high byte somewhere... But yeah, that way works well, too. Thanks :)
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Is there any way of making a 3D floor have different textures on different sides (ie the edges, not the top and bottom flats), or do I just have to chop my 3D floor up into segments defined by different control lines to achieve that?
User avatar
Shinjanji
Posts: 198
Joined: Sun Nov 06, 2005 16:45
Location: Pennsylvania, USA

Post by Shinjanji »

@Enjay:
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.
;)
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

I think he meant on different sides of the actual 3D floor. And I think the only way to achieve that is to cut your floor into triangles or whatever, so that each actual floor has the different texture. Or something like that.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

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.
Locked

Return to “Closed Bugs”