Actions allow you to create dynamic experiences in your spaces. They can be created with the Action Button element.
Possible actions include:
- Updating a room / element property
- Invoking a function on a room or element
- Modify user tags
Actions can be built using the Action Builder. The open the builder, click on the pencil icon next to the Action property.
The action builder is comprised of multiple rows, where each row is an action. Typically, a single row looks like this:
The first part of the row selects what to act on. This can be thought of as the target of the action. The available targets are:
- An element in a room
- A room
- A user
- Tagged elements
The next part of the row specifies the action to perform. In the example above, the action is to "set" the value of the "visible" property to true. The follow actions are available:
- Elements and Rooms
- Set / append to property
- Add/remove tag
- Increase / decrease
- Invoke an property
- Add / remove tags
Actions can be used to adjust the properties of elements, including their position. Therefore, it is possible to create multiple versions of a room by using buttons that adjust the position of the room elements.
For complex rooms, it would be very tedious to manually create buttons that update the X, Y, width, and height of each element.
The Snapshot Layout feature allows you to select elements and automatically creates a button that positions them in their current position. If you move the elements later, you can use the button you created to return the elements to their original position.
One very powerful feature of buttons is the ability to have them execute automatically when some condition is met. You can specify the condition using the Apply on Condition property. Clicking on the pencil brings up the Condition Builder which is very similar to the action builder.
In the example above, the button will automatically execute when the number of people in the room Max's Desk is greater than 5.
Updated 2 months ago