Attribute

From SIMboxWiki
Jump to: navigation, search

An information retrieval mechanism defined for an entity's specific behavioral characteristic.
For example, an attribute "ATT_HEIGHT" provides the entity's current height.
Attribute "ATT_LOCATION" provides the entity's current location.

Container

Self notify

Callback

Tip:

In order to retrive such an attribute you can right click on your .cpp file and select SIMbox code and Get attribute.

GetAttribute1.png

Then start typing the attribute name. for example: "ATT_HEIGHT" and select the attribute from the list. GetAttribute2.png


The generated code will look like this:


float attHeight = 0.0f;
GET_ENTITY_ATT_BY_UNIT(_pOwnerEntity, EntityWorld::ATT_HEIGHT, attHeight, UNIT_TYPE_DEFAULT);

See Also

Action

Entity

Properties