[No] line_align(floor|ceiling) only aligns in one dimension

Moderator: GZDoom Developers

line_align(floor|ceiling) only aligns in one dimension

Postby TOGoS » Sun Feb 15, 2004 3:01 am

line_align(floor|ceiling) only aligns in one dimension.
Illustration:

Image

I would expect it to act as in 'how do i do this', but instead of aligning the flat *to* and *along* the line, it only aligns the flat *to* the line. I don't know if this is a bug or not, but it severely limits the usefulness of line_align(floor|ceiling), and I don't see how the current behavior is useful
User avatar
TOGoS
It's not an octopus. It's a dancin' buddy.
 
Joined: 22 Nov 2003
Location: Wisconsin

Postby Xaser » Sun Feb 15, 2004 8:56 am

Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Risen » Sun Feb 15, 2004 9:29 am

This special would be most useful if it aligned to the line like requested above and also rotated the flat. (Does it do that? I have yet to try it.)
User avatar
Risen
 
Joined: 08 Jan 2004
Location: N44°30' W073°05'

Postby Graf Zahl » Sun Feb 15, 2004 10:00 am

Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?


No, they override each other. They are not cumulative.


And the code is rather obvious. It only aligns the angle and the y-offset of the texture but not the x-offset. As it is this special looks rather useless...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Sun Feb 15, 2004 1:16 pm

Yes but any maps that use the specials might be adversely affected if this were changed. How about a new line special:

Code: Select allExpand view
line_alignvertex(int lineid, int side, int vertex, int ceiling, int floor)

lineid: The ID of the line to use.
side: 0 for sector on the front of the line, 1 for back.
vertex: 0 for the line's first vertex, 1 for the second.
ceiling/floor: 1 to align this flat to the vertex, 0 to ignore it.


This would position the corner of the specified flats to the specified vertex. Thoughts?
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Graf Zahl » Sun Feb 15, 2004 1:33 pm

HotWax wrote:Yes but any maps that use the specials might be adversely affected if this were changed. How about a new line special:

Code: Select allExpand view
line_alignvertex(int lineid, int side, int vertex, int ceiling, int floor)

lineid: The ID of the line to use.
side: 0 for sector on the front of the line, 1 for back.
vertex: 0 for the line's first vertex, 1 for the second.
ceiling/floor: 1 to align this flat to the vertex, 0 to ignore it.


This would position the corner of the specified flats to the specified vertex. Thoughts?


How about line_alignvertex(int lineid, int sector-tag, int side, int vertex, int floorceiling) ?

This way an entire group of sectors could be aligned which don't even need to touch the line. This might be extremely useful if you have large rooms with different tags for parts of it but want to align all of it to a specific line.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Risen » Sun Feb 15, 2004 1:46 pm

Heh, it took a week for anyone to tell me how to use it at all... do any maps actually use it?

I thought the reason for using a line was to define rotation and panning simultaneously, which I believe would be much more useful than align to vertex. if you're just panning it, you can use the panning already implemented. That's not that hard. Rotation and panning together would be more difficult, making a new special actually do something useful...
User avatar
Risen
 
Joined: 08 Jan 2004
Location: N44°30' W073°05'

Postby TOGoS » Mon Feb 16, 2004 3:04 am

Graf Zahl wrote:How about line_alignvertex(int lineid, int sector-tag, int side, int vertex, int floorceiling) ?

This way an entire group of sectors could be aligned which don't even need to touch the line. This might be extremely useful if you have large rooms with different tags for parts of it but want to align all of it to a specific line.


Well, yeah. It'd be nice to be able to specify a sector tag and align the whole thing, but OTOH the main reason I wanted to use this special was because it didn't *need* a sector tag. I could simply mark all the lines which had a sector behind them that should have their ceiling aligned with a common line id, and then i could use the sector IDs for other things, like lighting effects.

Maybe the thing to do would be to have a sector tag of 0 mean 'use the sector attached to the specified side of the line'.

HotWax wrote:but any maps that use the specials might be adversely affected if this were changed.


Well, AFAICT, it's rather unpredictable where the flat will be lined up x-wise, anyway (after rotation and all), so it probably wouldn't break much, if anything, while making these specials specify x-wise panning would make them about 10x as useful. So I say go ahead and change the existing specials to align the flat's corner to the appropriate vertex.
User avatar
TOGoS
It's not an octopus. It's a dancin' buddy.
 
Joined: 22 Nov 2003
Location: Wisconsin

Postby Graf Zahl » Mon Feb 16, 2004 4:22 am

TOGoS wrote:Maybe the thing to do would be to have a sector tag of 0 mean 'use the sector attached to the specified side of the line'.




Of course. Like most other specials this would be a logical extension of the definition.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Xaser » Mon Feb 16, 2004 3:36 pm

Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?


No, they override each other. They are not cumulative.


Well, that's pretty stupid. Maybe this could be fixed?
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Eevee » Mon Feb 16, 2004 5:20 pm

As a side note: try using Line_Align* with a sector that has a scroll type... interesting result.
User avatar
Eevee
wow, i'm still here!
 
Joined: 16 Jul 2003

Postby Risen » Mon Feb 16, 2004 5:28 pm

Xaser wrote:
Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?


No, they override each other. They are not cumulative.


Well, that's pretty stupid. Maybe this could be fixed?


That part makes sense. To me, it's the original behavior that doesn't.
User avatar
Risen
 
Joined: 08 Jan 2004
Location: N44°30' W073°05'

Postby Graf Zahl » Mon Feb 16, 2004 5:33 pm

Xaser wrote:
Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?


No, they override each other. They are not cumulative.


Well, that's pretty stupid. Maybe this could be fixed?



It's the same as colors. Setting red first and blue second isn't cumulative either. On static init linedefs it would make sense to be but not on ones that can be called during the game.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests