Page 1 of 1
Aligning flats on 3D sectors
Posted: Mon Feb 18, 2008 17:36
by Rex Claussen
I did a search on the forums and came up empty. How do I align flats on 3D sectors that do not fit within an editing grid (typically the 64*64 grid). I have some crates that are suspended from an overhead conveyor chain, and the in-game sectors overlap the grid. The flats for the crate tops and bottoms don't look right, because of course they are being drawn to fit the grid.
I tried using Line_AlignFloor & Line_AlignCeiling on the dummy sector but that didn't work. I even tried using those specials on the in-game sector (which I knew was not going to work), and sure enough it did not work.
Posted: Mon Feb 18, 2008 17:54
by Graf Zahl
There both specials are nasty and useless: They need to be used in a script, limiting their usefulness considerably.
You have to use
Sector_SetRotation = 185,
Sector_SetCeilingOffset = 186,
Sector_SetFloorOffset = 187,
Sector_SetCeilingScale = 188,
Sector_SetFloorScale = 189,
to change alignment - all in a script. For 3D floors it must be done in the control sector but you have tp swap ceiling and floor for obvious reasons.
Posted: Mon Feb 18, 2008 18:16
by Rex Claussen
Graf, I couldn't quite grasp what you were saying. It sounded like you were saying that Line_AlignFloor & Line_AlignCeiling need to be used in a script (but don't work), but then it also sounded like you said the other specials need to be used in a script.
Furthermore, what do those values represent (i.e., 185 - 189), and where are they inserted in the specials? Do I need to use all these specials to align flats? And will I need to play with the angles, etc. to see what works?
It would be great if you can provide an example. Thanks.
Posted: Mon Feb 18, 2008 19:13
by Graf Zahl
Yes, you need to use the specials i a script. But since the Line_* specials in some way need a reference line to work with they are a bit difficult to use. I never found a way to do it with them. The numbers are just the internal definitions because I was too lazy to edit them out.
Best look in the ZDoom Wiki for further information. If you need some maps as examples, there's a few uses in KDiZD.
Posted: Mon Feb 18, 2008 21:41
by Enjay
Graf Zahl wrote:Sector_SetCeilingOffset = 186,
Sector_SetFloorOffset = 187,
Although Graf's name for those is actually a better description of what they do, you'll find them in the Wiki and zspecial.acs as Sector_SetCeilingPanning and Sector_SetFloorPanning.
Posted: Mon Feb 18, 2008 22:20
by Graf Zahl
Ugh. Please don't tell me that their internal names is different than their real name.
I remember being confused by this before and getting compiler errors.
Also there's Sector_SetFloor/CeilingScale2 specials which can be passed fixed point values for more precise scaling.
Posted: Tue Feb 19, 2008 0:21
by Rex Claussen
I got it to work using Sector_SetCeilingPanning and Sector_SetFloorPanning. Thanks.