Skip to content

Lua:Vertex

anotak edited this page Jun 29, 2018 · 5 revisions

Properties

selected

position

Methods

GetIndex()

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

IsDisposed()

GetUDMFField(key)

SetUDMFField(key,value)

GetLines()

TryToMove(v) or TryToMove(x,y)

either takes some Vector2D 'v' or just 2 numbers. TryToMove is a nice function that tries to move our vertex but only succeeds if we aren't going to run into another vertex or create overlapping linedefs or other bad geometry. It returns true on success, false if it did not move.

SharesLine(other)

SnapToGrid()

SnapToAccuracy()

Join(other)

Dispose()

ToString()