I have a timer in my Main scene and I want to be able to change its wait time according to how fast the game is. So I attached a script to this ObstacleTimer and I wrote:
if TimeManager.VELOCITY >= 5.5:
Timer.wait_time = 1.0
elif TimeManager.VELOCITY >= 3.5:
Timer.wait_time = 2.0
Timer.wait_time = 3.0
func _process(delta: float):
This give me the following error:
Invalid set index 'wait_time' (on base: 'GDScriptNativeClass') with value of type 'float'.
I tried changing from float to int, but it gives me a similar error:
Invalid set index 'wait_time' (on base: 'GDScriptNativeClass') with value of type 'int'.
Can anyone help me solve this?