Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | flonkopaten | |
Old Version | Published before Godot 3 was released. |
I want to make a fading light on my script, how do i set the light energy with script?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | flonkopaten | |
Old Version | Published before Godot 3 was released. |
I want to make a fading light on my script, how do i set the light energy with script?
Reply From: | flonkopaten |
I found out myself, this is how i did it.
var mylight = get_node("../DirectionalLight")
var energy = mylight.get_parameter(3)
energy -=0.03
mylight.set_parameter(3, energy)
Reply From: | eons |
It does not have a setter, it seems so you will have use set_parameter( int variable, float value )
with PARAM_ENERGY
as first parameter.
Everything is in http://docs.godotengine.org/en/stable/classes/class_light.html (just lacks of details…)