Today's problem is audio related. I'm after a way for players to play back the voice file that has just been played so they can check if they heard it correctly (my game is language-learning oriented so a repeat-button would be ideal).
Over the weekend I tried playing around with screens but didn't get anywhere, and this morning I took a stab at adding a button to the default in-game menu. I can't work out though how to get it to play the last used file.
What I have at the moment will play a specific file, but it will play it over everytime the scene progresses.
Any help?
Thank you.
Code: Select all
##############################################################################
# Quick Menu
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:
# Add an in-game quick menu.
hbox:
style_group "quick"
xalign 1.0
yalign 1.0
textbutton _("Repeat") action voice("michelle/Michelle_247.ogg")#at the mo this just plays the line over and over
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
textbutton _("Save") action ShowMenu('save')
textbutton _("Skip") action Skip()
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Prefs") action ShowMenu('preferences')