Playing sound effect after a rollback

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
duck-and-wolf
Regular
Posts: 47
Joined: Thu Aug 29, 2019 6:20 pm
Completed: Head of the Class
Organization: Duck & Wolf
Contact:

Playing sound effect after a rollback

#1 Post by duck-and-wolf » Wed Aug 12, 2020 2:25 pm

Is it possible to play a sound effect when rolling back? I tried having an activate_sound on the button for rolling back in the quick menu, but it seems like, because the game is "rewinding", it doesn't bother to play it.

Then I tried a list of functions on the action of the button, i.e.:

Code: Select all

action [Rollback(), Play("audio", "rewind.ogg")]
...but it seems like once it executes the rollback it just ignores that second action. And putting the Play() first in the list also results in it just getting ignored/stopped as soon as the rollback starts a millisecond after the audio begins to play (I assume, since I don't actually hear anything...).

There is a related sort of issue, if you put an activate_sound on the Yes button in the confirm screen, when you hit Yes on the "Are you sure you want to load?" screen, the sound will not be played because the load functionality has kicked in and killed all currently playing audio. However, you can play a sound in your config.after_load_callbacks list and get the same result. So I'm hoping there's some equivalent after_rollback_callbacks feature or something.

Post Reply

Who is online

Users browsing this forum: Google [Bot]