Play Sound on Game Pause

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
User avatar
Westeford
Regular
Posts: 151
Joined: Mon Jun 19, 2017 4:43 pm
Completed: 12 Hours to Die
Projects: Project Premonition
itch: westeford
Location: United States
Contact:

Play Sound on Game Pause

#1 Post by Westeford »

I feel like an idiot.
I want to play a sound whenever the player performs a right-click to bring up the game menu.
I assume I have to put

Code: Select all

play sound donk
or

Code: Select all

activate_sound "donk.ogg"
but I'm having trouble finding where to put it.

Any suggestions are appreciated, thank you.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Play Sound on Game Pause

#2 Post by Imperf3kt »

There's a few ways to do this (none of which I recall right now)

I think the easiest might be to place this line in the SAVE screen.

Code: Select all

    on Show Play audio ("mysound.ogg")
I'm almost certain I forgot something, going by memory
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Google [Bot], Sugar_and_rice, voluorem