PauseAudio only works as a button, not as statement [SOLVED]
Posted: Mon Sep 27, 2021 9:16 pm
What the title says
I want to pause the music at one point and it works perfectly fine when activated via a button a la this
But nothing happens when I do exactly the same thing as a statement
Using the button method will not work since the stop in the music is the game reacting to a thing the MC says (without the player having chosen anything) aka it's not an interactive moment.
I don't even get an error message or anything, the game just ignores the pause order and keeps playing the music. Am I missing something really dumb or is PauseAudio actually not possible to just...do?
A way to kinda force it to work is this
Aka, repeatedly call the empty screen to activate the toggle, but my professor used to say "if you have to constantly repeat something, there has to be an easier way to streamline it". So I assume there is a way to just...have it be statement and I don't know how to use it
I want to pause the music at one point and it works perfectly fine when activated via a button a la this
Code: Select all
label start:
"test for credits"
play music cred
"normal audio"
screen pause:
textbutton "Pause" action PauseAudio('music', value='toggle')
show screen pause
"paused music?"
Code: Select all
label start:
"test for credits"
play music cred
"normal audio"
$ PauseAudio('music', value='toggle')
I don't even get an error message or anything, the game just ignores the pause order and keeps playing the music. Am I missing something really dumb or is PauseAudio actually not possible to just...do?
A way to kinda force it to work is this
Code: Select all
screen pause:
on 'show' action PauseAudio('music', value='toggle')
show screen pause
hide screen pause
"paused music?"
show screen pause
hide screen pause