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.
Is there a way to create a textbutton to perform 2 or more 'actions' at once? such as playing a sound / music / voice and changing the background or such? If not what kind of 'button' would I need to use? Currently I have something like this but want to add another action.
Just enclose all the actions in brackets and put commas in between them.
Thank you! *isn't the OP but is also having the same problem*
Just one problem though, when I did that it crashed saying that "'module' object has no attribute 'background'". How do I go about making it understand what to do to background?
textbutton _("song") action [mr.Play("song.mp3"), SetVariable("background", "bg01.jpg")]
# So I tried this, after defining the image in an init, but that didn't work either.
textbutton _("song") action [mr.Play("song.mp3"), SetVariable("background", "bg 01")]
(I drew my avatar especially to express the scary feeling I get from the code as I type it... XD)