Skip to main content
Question

How to setProperties only on certain instances in a set?

  • May 18, 2024
  • 1 reply
  • 121 views

aen-infloww

I’m doing a Instances.forEach((i) => { i.setProperties({"signal": "red"}) }) but the problem is not all is not all instances in Instances has the property signal, so when it encounters such an instance, it breaks with an error like blah blah does not exist.

How to I do a if (i.propertyExists("signal") { i.setProperties({"signal": "red"}) }?

This topic has been closed for replies.

1 reply

tank666
  • 4873 replies
  • May 18, 2024

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings