![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | 9BitStrider |
I have a group saved into an array:
var get_nodes = get_tree().get_nodes_in_group('wpn_icons')
What I want to do is compare the INDEX number of that array to a value. If it matches, it changes the icon’s color to the needed palette. It not, it changes the color to a greyscale.
Example:
if get_nodes == weapon:
get_nodes[weapon].material.set_shader_param('r_col1', Color(Blue)
else:
get_nodes.material.set_shader_param('r_col1', Color(Grey)