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.
imagebutton auto "ui/bgselect/moviescene1a_%s.png" action [OpenURL("http://websiteurl.com"), Play("sound", "se/open.ogg")] hovered Play("sound", "se/select.ogg")
But what I would like is for instead of it opening a URL it opens a folder in the game directory.
Is this possible and what would the code be to replace the OPENURL code, and for it to automatically link to the game directory so i do not need to include the c: part as well. Just the folders after the /game/ part.
Thxs, I was hoping to find something a little more 'safe' that might work on all platforms.
Ideally just similar to OPENURL but goes to a local folder, i don't really want it to open a file or exe. I just want it to open a folder within the game directory.
Well, hate to say it but there's no such thing as "work on all platforms".
You can use the above example to open a folder. And I added a small change to make sure it doesn't crash on other operating systems... I hope. Now if it really is important you may consider extending the functionality so it works on other platforms. But if you can avoid it, do so.
You can use this as a normal function in the labels, or as a screen action.