I have all my objects monochrome (black and white) I want all the white objects to gradually cycle through the color spectrum continously.
I am not talking about animation, I am talking about the “color mode” block to change color
Thank you for your help!
Can you send a screenshot and tell me what kind of object it is?
Thanks
(Sprites)
Basically all of the white parts of this
turn into this:
You can use this option to change the color.
Use a scene timer where it changes to a different color every fixed interval of time. There is no color randomizer function so you have to hard-code the colors yourself.
Hope I could help
That’s what I was trying to say in the beginning. To use that thing but with a variable.
The variable will be +1 every second. I tried it but it didnt seem to work
1 Like
If there is no way then it’s ok I will try to find another way
An example of a correct value for the color field would be “0;0;0” which gives the color black. The color field is of String type.
For integers, we have the Random(max) function. So, you need to make scene variable which picks a random integer from 0 to 255 after fixed intervals of time. Then use it to form the string here.
The VariableString(variable) function changes the integer value to string.
So, example of one way of filling the color field may be:
VariableString(var)+“;”+VariableString(var2)+“;”+VariableString(var3)
where var, var2, var3 are the scene variables where a random value is assigned every fixed interval of time(use timers).
The way i said works
I have tried it.
I was thinking of it to become a slow change from (red to green) (green to blue) (blue to red). So I think I will use another variable to identify on which part of the cycle it is at i.e(red to green). then if it is (red to green) then the red will slowly decrease while the green is increasing. Thanks for informing me the correct value for the color field.I will try to use it later. again thanks for the help
Thank you again, I am very new to this program.
1 Like
I recently tried to test the code on a demo. It appears that the red value is broken? every time there is red, it just turns black. Here is the demo I made http://www.mediafire.com/folder/yc2454cx877nh/ColorDemo
Oh well, you are storing to the text of the scene variable and you are using the function VariableString() to access the value of the variable. I think that is the problem.
No need to use a variable to store FInalColorSyntax. Straight away use that syntax in the color setting action.
I removed the FinalColorSyntax. I am storing them to the value and it seems to only give the option to use VariableString(). If I only type Variable() then it would give an error.
The values of the variables are changing and are working as they should but I think the color setting can’t read the red variable or something except it’s exactly the same as the others
Looking at your code, try this in the Change color of dot to action:
VariableString(Red)+“;”+VariableString(Green)+“;”+VariableString(Blue)
This should work
2 Likes
OMG it actually worked! Thank you so much!
2 Likes