Structs:Line
Lines are what make up sectors within a map. They're defined by two vertices and are made up of three parts: a bottom, a middle, and a top. Lines that have no back sector are set to be one-sided, making them impassable by default with only their middle part being usable. The bottom and top come into play when there are floor and ceiling height differences between two sectors. With 3D floors the middle part is the only one that can be used and represents the outside texture of the floor's walls. Textures can be applied to the middle of two-sided lines, but it will not tile vertically to fill the entire space like one-sided lines do. This can be used to create effects like glass or fences since they can have transparency. If a line is two-sided then it will hold a pointer to both its front and back sector, otherwise only having a front sector. There are multiple ways to access lines. Sides have a linedef variable which will point to their line. Sectors have an array, lines, which contains all of their lines. Level also has a Lines array which contains every line in the map.
Fields
- readonly Vertex v1 - The first vertex that makes up the line. This one is always to the right of the line relative to its facing direction.
- readonly Vertex v2 - The second vertex that makes up the line. This one is always to the left of the line relative to its facing direction.
- readonly Vector2 delta - A vector that points from v1 to v2 with the length of the line.
- uint flags - Flags for the line:
- Line.ML_BLOCKING - Line is set to block anything that isn't a hitscan attack or projectile.
- Line.ML_BLOCKMONSTERS - Line is set to block monster movement.
- Line.ML_TWOSIDED - Line has both a front and back sector.
- Line.ML_DONTPEGTOP - Draw the top part of the line from top to bottom instead of the other way around.
- Line.ML_DONTPEGBOTTOM - Draw the bottom and (if two-sided) middle parts of the line from bottom to top instead of the other way around.
- Line.ML_SECRET - Draw the line in the automap as though it were one-sided.
- Line.ML_SOUNDBLOCK - If two lines with this flag form a barrier between sectors, sound is blocked from traversing through it.
- Line.ML_DONTDRAW - Don't draw the line on the automap at all.
- Line.ML_MAPPED - Set if the line has already been drawn in the automap.
- Line.ML_REPEAT_SPECIAL - Allow the special on this line to be activated multiple times.
- Line.ML_ADDTRANS - This line is set to use additive translucency.
- Line.ML_MONSTERSCANACTIVATE - Monsters can activate this line similar to a player.
- Line.ML_BLOCK_PLAYERS - Line is set to block player movement.
- Line.ML_BLOCKEVERYTHING - Line is set to block anything that tries to move past it.
- Line.ML_ZONEBOUNDARY - Line acts as a barrier for reverbs.
- Line.ML_RAILING - Line acts like a 32-unit high rail.
- Line.ML_BLOCK_FLOATERS - Line is set to block anything with the FLOAT flag.
- Line.ML_CLIP_MIDTEX - If two-sided, the texture in the line's middle part is set to never render below the floor or above the ceiling.
- Line.ML_WRAP_MIDTEX - The middle part's texture is set to fill the entire space vertically if the line is two-sided.
- Line.ML_3DMIDTEX - If two-sided, the middle part's texture acts like a 3D floor.
- Line.ML_CHECKSWITCHRANGE - Check the vertical range of the activator when trying to use this line.
- Line.ML_FIRSTSIDEONLY - This line can only be activated when done from the front side.
- Line.ML_BLOCKPROJECTILE - Line is set to block projectiles.
- Line.ML_BLOCKUSE - Line is set to block the use action.
- Line.ML_BLOCKSIGHT - Line is set to block any sight checks.
- Line.ML_BLOCKHITSCAN - Line is set to block hitscan attacks.
- Line.ML_3DMIDTEX_IMPASS - If set to use a 3D mid texture, treat the line similar to Line.ML_BLOCKING and allow projectiles and hitscan attacks to go through it.
- uint flags2 - Additional flags for the line:
- Line.ML2_BLOCKLANDMONSTERS - Line is set to block anything without the FLOAT flag.
- uint activation - The type of trigger needed to activate this line.
- int special - The special to trigger when activated.
- int args[5] - An array containing up to 5 arguments for the special that activates.
- double alpha - The transparency of the line.
- readonly Side sidedef[2] - An array containing the front Side and, if two-sided, back Side.
- Line.front - Index for the front Side.
- Line.back - Index for the back Side.
- readonly double bbox[4] - Bounding box that encapsulates the entire line.
- 0 - The maximum y coordinate of the box
- 1 - The minimum y coordinate of the box
- 2 - The minimum x coordinate of the box
- 3 - The maximum x coordinate of the box
- readonly Sector frontsector - The sector on the front side of the line.
- readonly Sector backsector - The sector on the back side of the line if two-sided.
- int validcount - Used to keep track of whether or not the line has already been visited across various functions.
- int locknumber - What lock number is needed for the line to activate.
- readonly uint portalindex - The index for the line's portal in level's LinePortals array (currently inaccessible).
- readonly uint portaltransferred - The index for the sector portal that the line's portal was transferred to in level's SectorPortals array.
- readonly int health - How much health the line currently has.
- readonly int healthgroup - The id of the geometry the line is linked to when it takes damage.
Methods
Non-static
- bool isLinePortal()
- bool isVisualPortal()
- Line getPortalDestination()
- int getPortalAlignment()
- int Index()
- bool Activate(Actor activator, int side, int type)
- bool RemoveActivate(Actor activator, int side, int type, Vector3 pos)
- int GetUDMFInt(Name nm)
- double GetUDMFFloat(Name nm)
- string GetUDMFString(Name nm)
- int GetHealth()
- void SetHealth(int newhealth)