-
Notifications
You must be signed in to change notification settings - Fork 12
Lua:Thing
see the doomwiki article on Thing
is the thing selected? true/false
a Vector2D
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
integer number, tag. this only works on map formats that support it, such as UDMF or Hexen based formats the doomwiki article on tags
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.
Returns true/false, see below for explanation of flagnames.
flagname is a string, val is true/false.
flagnames are not hardcoded, but depend on game configuration. For standard Doom/Boom mapping, the full list of flags can be found in Configurations/Includes/Doom_misc.cfg:
"1": actor appears on skill 1 & 2
"2": actor appears on skill 3
"4": actor appears on skill 4 & 5
"8": actor is set to deaf/ambush
"16": actor only appears in multiplayer
An example for creating an imp and setting it to ambush:
newThing = Map.InsertThing(x, y)
newThing.type = 3001
newThing.SetFlag("8", true)