Here is a script that is supposed to lower the volume of a dfplayer from 30 to 0 in 200ms steps. It should take six seconds total. But, when the script is executed, the volume goes straight to zero with no delay.
Do I have an error in my script logic?
script:
- id: fadeout
then:
- repeat:
count: 30
then:
- lambda: |-
static int volume = 30;
volume -= 1;
if (volume < 0) volume = 0;
id(dfplayer1).set_volume(volume);
- delay: 200ms