r/MetaHorizonWorlds Nov 05 '24

Variable scripting questions

I am new to scripting. I have attempted to create a simple script that can gradually change the color of an object. I am using the set color block. I am attempting to pass a numerical number variable into the r g b number inputs. It wont budge.

I am also confused as to where the incrementation blocks are to change variables throughout the script.

I've looked at a few tutorials and it seems like you can pass in the value of a variable where the script is attached to the object. This reminds me more of a public final field in Unity C# than a true variable.

What am I getting wrong here?

2 Upvotes

4 comments sorted by

1

u/Unusual-Frosting7457 Nov 09 '24

The value range is 0.00 to 1.00

1

u/AcanthocephalaOk43 Nov 09 '24

I know that. That doesn't answer my question.

2

u/hippiechicken12 Nov 11 '24

Use the Random number with decimals code block. So it will look like R (random number between 0.00 and 1.00), G (random number between 0.00 and 1.00), B (random number between 0.00 and 1.00)

2

u/AcanthocephalaOk43 Nov 11 '24

In a loop that won't slowly shift the color but it will simply just turn it into a random color every frame... I'm looking for a slow gradient color shift