so im currently working on a pac-man remake and im making the ghosts, im currently at making the colors of the ghosts, but im having a problem
in the gd file for the ghost’s body, there is an error in this line of code:
func _ready():
self.modulate = (get_parent() as Ghost).color
the error identifier says its an error because the “Value of type “CompressedTexture2D” cannot be assigned to a variable of type “Color”.”, its because that the color is actually just a sprite image, but the thing is
i want it to be an image instead of an actual color because i already prepared the sprites for the ghosts, and i dont want them to go to waste (the body and eyes are in 1 image unlike in the tutorial where they are seperate image sprites), this is the code of the color variable thingy just incase you need it:
modulate changes the color of a canvas item’s texture. Maybe you mean self.texture? depends on the node’s type, and it might be proper to change the name of the color variable to something like texture or image.