Godot Version
Godot 4
Question
I’ve been trying to set a sprite such that each instance has it’s own color(based on a current variable) but every time, all the instances change color instead of just one.
I have no idea what to do.
Godot 4
I’ve been trying to set a sprite such that each instance has it’s own color(based on a current variable) but every time, all the instances change color instead of just one.
I have no idea what to do.
It’s hard to tell what might be causing your problem from the information I’m seeing. However, I can think of some things off the top of my head.
Where is the r, g, and b of this juice script getting set?
Some other nitpicks
juice.gd
, I see that you’re modulating the color of a CanvasItem(?) every frame based on r, g and b. Instead of applying these values continuously, I’d suggest having a function to change the color of that CanvasItem.