Get Attribute

Description

The Get Attribute behavior will retrieve an attribute from a selected object. You can then output this to use with other behaviors. Attributes can be set from the Object Properties, or set dynamically using the Set Attribute behavior. To learn more about attributes view the Object Attributes help documentation.

 

This behavior will Trigger an event immediately when executed. As soon as the behavior is executed it will return the specified attribute.

Properties

Object A

The attributes that you are seeing are specific to this object. By default the current object is selected, but you can tap the graphic and choose any other object in your scene.

Predefined

The Predefined selection will allow you to choose an attribute key that you have previously entered from the Object Properties.

Dynamic

The dynamic selection will allow you to manually enter a Attribute Key. Use this if you have dynamically created an attribute using the Set Attribute behavior. Note: Dynamic attributes are attributes that do not exist until your project is running, and another behavior has created it. Until it exists, the key will not return the value. So make sure you are executing this behavior after the set attribute has already created an attribute with the specified name.

Attribute Key

This is the name/title of the attribute you want to retrieve. The specified attribute will then return the value stored.

For Predefined Attributes you can tap the button and select the attributes from the list, for Dynamic you must enter the name of the attribute manually.

Outputs

Attribute Value

This is the value that is retrieved from the specified attribute. 

Examples

If you have created a "Health" attribute for each of your enemies in your scene, you can use the "Get Attribute" to return the health, and see the amount of health they have stored. 

 

 

Related

Set Attribute

Object Attributes

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk