Skip to content

Lua:Sector

zstephens edited this page Feb 1, 2020 · 9 revisions

see the doomwiki article on Sector

Properties

selected

is the sector selected? true/false. changing this affects all the connected linedefs/vertices

floorheight

ceilheight

floortex

the name of the flat used for the ceiling

ceiltex

the name of the flat used for the floor

effect

sector special effect the doomwiki article on sector types

tag

integer number, tag the doomwiki article on tags

brightness

integer. doom only accepts 0-255 but you can set this to other values

Methods

IsDisposed()

Returns true if the sector has been deleted or disposed

GetIndex()

Returns the editor index of the map element.

Note: the value returned will be 0-indexed, like the map format, whereas the tables in Lua start at 1.

Note 2: this number can change any time you add or remove map elements. sometimes elements are added at the beginning or middle instead of the end. the manner in which it changes is unpredictable and subject to change between doom builder versions.

GetUDMFField(key)

SetUDMFField(key,value)

GetSidedefs()

Returns a table of the sidedefs. if you are looking for linedefs, you have to go through the sidedefs.

Intersect(point)

point must be a Vector2D Returns true if point is inside the sector

GetCenter()

Returns a Vector2D of the sector's "center" position. The is computed as the center of the bounding box of all linedefs that reference this sector.

ToString()