I’d suggest you change the change_speed
method on player so that you can specify the duration in addition to the speed (e.g. player.change_speed(speed_multiplier, 16)
and get_tree().create_timer
can be called inside change_speed
) - and then call queue_free()
on the powerup immediately after. No need to keep the whole thing around if all you need is a timer.
1 Like