Skip to content

Lua:Thing

anotak edited this page Jun 29, 2018 · 9 revisions

see the doomwiki article on Thing

Properties

selected

is the thing selected? true/false

position

a Vector2D

type

integer number, the editor number determining what class this Thing is (ex. Shotgunner, Imp, Box of Shells, etc).

see the doomwiki article on thing types and thing types by number

tag

integer number, tag. this only works on map formats that support it, such as UDMF or Hexen based formats the doomwiki article on tags

action

arg0

arg1

arg2

arg3

arg4

Methods

IsDisposed()

Dispose()

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.

IsFlagSet(flagname)

SetFlag(flagname,val)

ClearFlags()

GetUDMFField(key)

SetUDMFField(key,value)

GetRadius()

LuaSector GetSector()

SetAngleRadians(newangle)

SetAngleDoom(newangle)

GetAngleRadians()

GetAngleDoom()

SnapToGrid()

SnapToAccuracy()

DistanceToSq(p)

DistanceTo(p)

Clone(v)

Clone(x,y)

Clone()

Clone this wiki locally