— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
Sets a custom property for an entity to the specified value. This property can then be referenced elsewhere, for example when evaluating a condition.
set_entity_property(entity, property_name, property_value)
Argument | Description | Type | Required |
---|---|---|---|
entity | Entity on which the property will be stored. | Entity | Yes |
property_name | Name of the property. | String | Yes |
property_value | Value that will be assigned to the property. | String, Decimal, Boolean | Yes |
When editing this function in the Script Editor, the Variable Expression Builder provides an easy way to choose which value you'd like to store in the property.
set_entity_property("chest01", "opened", true)
Results: A property is stored on the “chest01” entity with a Boolean value of “true”.
Use the Set Entity Property function to keep track of important information about specific entities, for example whether an NPC has already been visited by the player.