this is the code i've been trying to use for the imagebuttons:
Code: Select all
imagebutton idle "imgbutton/start.png" action Start("") Play(sound, "mouse_click.mp3") xpos 20 -120 focus_mask True at main_btns
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 371: u'Play' is not a keyword argument or valid child for the imagebutton statement.
imagebutton idle "imgbutton/start.png" action Start("") Play(sound, "mouse_click.wav") xpos 20 -120 focus_mask True at main_btns
^
Ren'Py Version: Ren'Py 7.0.0.196
Sat Aug 25 16:46:37 2018
Code: Select all
imagebutton idle "imgbutton/start.png" action Start(""),Play(sound, "mouse_click.mp3") xpos 20 -120 focus_mask True at main_btns
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/screens.rpy", line 357, in execute
screen main_menu():
File "game/screens.rpy", line 357, in execute
screen main_menu():
File "game/screens.rpy", line 370, in execute
vbox:
File "game/screens.rpy", line 371, in execute
imagebutton idle "imgbutton/start.png" action Start(""),Play(sound, "mouse_click.mp3") xpos 20 -120 focus_mask True at main_btns
File "game/screens.rpy", line 371, in keywords
imagebutton idle "imgbutton/start.png" action Start(""),Play(sound, "mouse_click.mp3") xpos 20 -120 focus_mask True at main_btns
NameError: name 'sound' is not defined
Windows-8-6.2.9200
Ren'Py 7.0.0.196
software 1.0
Sat Aug 25 16:50:35 2018
and while i'm here, here's the code i'm using for the text buttons and another code for the imagebuttons sounds i tried that also isn't working (but isn't crashing the game, which i guess is better?)
Code: Select all
style button:
properties gui.button_properties("button")
activate_sound "mouse_click.mp3"
style imagebutton:
activate_sound "mouse_click.mp3"