Advertisement
NyashniyVladya

RenPy. Саундчек, при смене громкости.

Nov 27th, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. # В любом файле.
  2. init python:
  3.     persistent.last_check = _preferences.get_volume("sfx")
  4.     def play_sound_check():
  5.         if persistent.last_check != _preferences.get_volume("sfx"):
  6.             persistent.last_check = _preferences.get_volume("sfx")
  7.             renpy.sound.play("sound_check.mp3", "sound")
  8. # В screens.rpy найти строчку:
  9. # bar value Preference("sound volume")
  10. # И дописать:
  11. bar value Preference("sound volume") changed play_sound_check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement