The Set Attribute behavior will allow you to set or change value of an attribute for a selected object. You can Attributes can be created from the Object Properties, or set and dynamically using this 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 set the desired value for the specified attribute.
The attributes that you are setting 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.
The Predefined selection will allow you to choose an attribute key that you have previously entered from the Object Properties.
The dynamic selection will allow you to manually enter a Attribute Key.
If the entered attribute key does not exist yet, it will automatically create it as soon as this behavior is exectured.
Note: Dynamic attributes are attributes that do not exist until your project is running, this set attribute behavior has created it. Until it exists, the key will not return the value.
So if you want to get the attribute make sure you are executing the Get Attribute behavior after the set attribute has already created an attribute with the specified name.
This is the name/title of the attribute you want to create or set/change. The specified attribute will then store the entered Atribute Value.
This is the value you want to store in the desired attribute.
This is the value that is set to the specified attribute.
This outputs the Object ID.
If you have created a "Health" attribute for each of your enemies in your scene, you can use the "Set Attribute" to change the stored health value each time you attack the enemy.