getHouseRoutingId
The getHouseRoutingId
export allows you to retrieve the Routing Bucket ID of a house instance.
This is useful for checking if a specific house is currently active (someone is inside) or to manage instance-based logic inside houses.
How to Use
To get the routing ID of a house, use the following code:
Here’s an example of a command that checks if a specific house is occupied:
This example checks if the house identified by 'house'
has an active routing bucket.
If no one is inside (routingId
is nil
), it prints that nobody is home.
If there is an active routing bucket, it prints the routingId
, indicating the house is currently being used.
Last updated