MapObject
The
Derived Types
The following types inherit all MapObject
properties and functions:
Properties
Property | Type | Description |
---|---|---|
The object's index in the map | ||
The object's type (see TYPE_ constants) |
||
The object type name (eg. Vertex ) |
Constants
Name | Value |
---|---|
TYPE_OBJECT |
0 |
TYPE_VERTEX |
1 |
TYPE_LINE |
2 |
TYPE_SIDE |
3 |
TYPE_SECTOR |
4 |
TYPE_THING |
5 |
Constructors
No Constructors
This type can not be created directly in scripts.
Functions
Regarding MapObject *Property
and Set*Property
functions
MapObject properties in SLADE generally mirror the properties defined in the UDMF specification. As an example, setting the texturetop
string property on a
Overview
Properties
HasProperty
Parameters
name (string ): The name of the property to check
Returns
boolean :true
if the object has a property matching the givenname
BoolProperty
Parameters
name (string ): The name of the property to get
Returns
boolean : The value of the property, orfalse
if no applicable value was found
Notes
If the property doesn't exist in the object, the game configuration is checked for a default value.
IntProperty
Parameters
name (string ): The name of the property to get
Returns
integer : The value of the property, or0
if no applicable value was found
Notes
If the property doesn't exist in the object, the game configuration is checked for a default value.
FloatProperty
Parameters
name (string ): The name of the property to get
Returns
float : The value of the property, or0
if no applicable value was found
Notes
If the property doesn't exist in the object, the game configuration is checked for a default value.
StringProperty
Parameters
name (string ): The name of the property to get
Returns
string : The value of the property, or an empty string if no applicable value was found
Notes
If the property doesn't exist in the object, the game configuration is checked for a default value.
SetBoolProperty
Sets the property
Parameters
name (string ): The name of the property to setvalue (boolean ): The value to apply
Notes
The property is added if it doesn't already exist.
SetIntProperty
Sets the property
Parameters
name (string ): The name of the property to setvalue (integer ): The value to apply
Notes
The property is added if it doesn't already exist.
SetFloatProperty
Sets the property
Parameters
name (string ): The name of the property to setvalue (float ): The value to apply
Notes
The property is added if it doesn't already exist.
SetStringProperty
Sets the property
Parameters
name (string ): The name of the property to setvalue (string ): The value to apply
Notes
The property is added if it doesn't already exist.