Skip to main content

Use color variable in conditions (if color-variable = #000000 ...)


Przemek3

Love variables!
I would love it even more if there was a possibility to use color variables in the conditionals.

Very simple use case:
I want an object to change color when it’s clicked.
Let’s say I want it to become blue when it’s yellow, red when it’s blue, yellow hen it’s red.

Eventually I can obtain the same result with boolean, placing layers and hide/show them but it’s far less efficient.

This topic has been closed for replies.

3 replies

Bruno_Mattelet2

Heyy,

I would kinda like to do the same but with String.

So when I click an element, if the String is String 1, then it’s renamed to String 2. If it’s already string 2, it’s renamed to string 1.

But look like I can’t do it atm …


Przemek3
  • Author
  • New Participant
  • 13 replies
  • July 18, 2023

Hey @Bruno_Mattelet2
thanks for the comment, but you can do it. The only variable excluded from conditional is color:
Screenshot 2023-07-18 at 22.22.41


  • 0 replies
  • October 16, 2023

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.


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