Set Color effect and parameters - Colors not changing accordingly

0 favourites
  • 3 posts
From the Asset Store
Color all tiles with the same color in 22 moves or less!
  • I'm trying to set an object to change its color after a random period of time. After such time, it changes to a randomly selected color (yellow, green, blue, or red). I'm using 3 variables on the object and then plugging those variables into an action that determines the values of the Set Color effect. Initially, all values are 0. After that, the only color I'm getting is red even though I've confirmed that the randomly selected color variable and the other color variables are all working just fine. It's the actual Set Color effect that's not registering.

    In the event line where I use the Set Color effect parameters, I have three separate actions for each color parameter of the effect - 0: red, 1: green, and 2: blue - and plug in each of the object's color-related variables to set the effect value. But, as mentioned, the only result I'm getting is RED. Am I doing something wrong when setting the values of the Set Color parameters?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In C3 Set Color effect takes only one parameter, which contains all three channels. So use rgbEx255(r,g,b) or rgba255(r,g,b,alpha) expression.

    Instead of the effect you can also use "Sprite -> Set color" action.

  • dop2000 - While waiting for a reply I continued to do some more digging and re-discovered exactly what you just said. So everything is working perfectly now. Thank you, though!

    However, I did not know about the Set Color action within the sprite, itself! Not sure how I ever missed that!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)