Search found 2397 matches

by Ocelot
Mon Apr 15, 2024 2:01 pm
Forum: Ren'Py Questions and Announcements
Topic: set_queue_empty_callback behavior
Replies: 1
Views: 30

Re: set_queue_empty_callback behavior

Note that empty queue callback is called when the queue becomes empty, i. e. when the last song starts playing, not when it finishes. https://www.renpy.org/doc/html/audio.html#renpy.music.set_queue_empty_callback renpy.music.set_queue_empty_callback(callback, channel='music') This sets a callback th...
by Ocelot
Sat Apr 13, 2024 4:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Making fading popups in a screen [SOLVED]
Replies: 4
Views: 129

Re: Making fading popups in a screen

1) Nothing after return is executed. 2) Even if would, your use of renpy.pause is likely to cause interaction withing interaction error 3) popup_cant_go = False creates a local variable which is instantly destroyed in this case. It odes not modyfy anything. Your best bet is to show a custom screen w...
by Ocelot
Sat Apr 13, 2024 6:59 am
Forum: Ren'Py Questions and Announcements
Topic: Empty textbox shows up while using renpy.pause()
Replies: 5
Views: 262

Re: Empty textbox shows up while using renpy.pause()

Imperf3kt wrote: Sat Apr 13, 2024 6:31 am I wasn't aware Ren'Py said that when you tried to install Atom. I have never had an issue with it myself. YMMV I guess.
It is this problem. Quite a few people in Discord and several on forums complained the exact same thing happened to them.
https://github.com/atom/atom/issues/11406
by Ocelot
Wed Apr 10, 2024 4:42 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved!] Name Generator generating twice?
Replies: 5
Views: 223

Re: Name Generator generating twice?

Screens should not have any side effects in their code. Screen code is run multiple times during prediction and every time screen refreshes (basically, when anything happens) and can be executed with any parameters, including those you never tried to pass. In short, move random name generation and e...
by Ocelot
Wed Apr 10, 2024 4:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen parameters not clearing properly
Replies: 2
Views: 89

Re: Screen parameters not clearing properly

Screens should not have any side effects in their code. Screen code is run multiple times during prediction and every time screen refreshes (basically, when anything happens) and can be executed with any parameters, including those you never tried to pass.
by Ocelot
Wed Apr 10, 2024 8:52 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Game doesn't save dictionary changes.
Replies: 2
Views: 94

Re: [HELP] Game doesn't save dictionary changes.

https://www.renpy.org/doc/html/save_load_rollback.html The Python state consists of the variables in the store that have changed since the game began, and all objects reachable from those variables. Note that it's the change to the variables that matters – changes to fields in objects will not cause...
by Ocelot
Tue Apr 09, 2024 3:08 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Autosave & Autoload only once?
Replies: 2
Views: 185

Re: Autosave & Autoload only once?

Something like:

Code: Select all

label main_menu:
    if persistent.scary_thing:
        $ renpy.run( Start('scary_label') )
    else:
        show screen main_menu
        pause
    return
Then you could turn off flag in the scary_label.
by Ocelot
Tue Apr 09, 2024 3:04 am
Forum: Ren'Py Questions and Announcements
Topic: Render button with transform
Replies: 2
Views: 169

Re: Render button with transform

I am not completely sure how the first piece ofcode works, but you can wrap child in transform you need: # at the end of init self.child = Transform(child=self.child, matrixcolor=TintMatrix(self.current_text_color)) If you want to constantly chnage text color and make it reflect on text, then replac...
by Ocelot
Thu Apr 04, 2024 12:40 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How to define persistable objects?
Replies: 4
Views: 151

Re: How to define persistable objects?

As persistent data is loaded before init python blocks are run, persistent data should only contain types that are native to Python or Ren'Py. Alternatively, classes that are defined in python early blocks can be used, provided those classes can be pickled and implement equality. My approach in sim...
by Ocelot
Sun Mar 31, 2024 5:16 pm
Forum: Ren'Py Questions and Announcements
Topic: KeyError: 'retain' when calling say with name argument
Replies: 4
Views: 160

Re: KeyError: 'retain' when calling say with name argument

I'm actually not sure what you are doing here. What is this "character" object you are using and why? https://www.renpy.org/doc/html/dialogue.html#the-character-store Are you trying to load save and getting this error afterwards? If so, then default is the problem. Character objects are n...
by Ocelot
Sun Mar 31, 2024 12:19 pm
Forum: Ren'Py Questions and Announcements
Topic: Animated imagebutton in main menu[sloved]
Replies: 3
Views: 226

Re: Animated imagebutton in main menu

Button without any actions will not receive any events. If you want hover events to work, you need to provide an action. You can use a built-in action which does not do anything, called NullAction()
by Ocelot
Sat Mar 30, 2024 3:15 pm
Forum: Ren'Py Questions and Announcements
Topic: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?
Replies: 2
Views: 139

Re: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

Always have data you want to show after loading up to date in your game, and then use after_load special label to show some screens telling player what happened before. https://www.renpy.org/doc/html/label.html#special-labels Example: default happened_before = ["you have started the game"]...
by Ocelot
Sat Mar 30, 2024 3:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Quest System Screen Problem
Replies: 5
Views: 245

Re: Quest System Screen Problem

As for this question -> Nope, it is not. Well... Actually it is, just not in the way I thought. ShowMenu shows screen in the menu context, while that screen is shown, you are not in the main game, and jumping from there will not affect main game flow. As soon as you finish showing screen or return ...
by Ocelot
Tue Mar 26, 2024 3:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved?] Can't stop errant sound playing after a save load
Replies: 12
Views: 318

Re: Can't stop errant sound playing after a save load

By the way, there is not function "renpy.sound.stop()", but I guess that's just a typo, right? There... is? https://www.renpy.org/doc/html/audio.html#renpy.music.stop Most renpy.music functions have aliases in renpy.sound . These functions are similar, except they default to the sound cha...
by Ocelot
Tue Mar 26, 2024 4:27 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] Using videos as button?
Replies: 5
Views: 222

Re: Using videos as button?

A modified version of your approach seems to work: screen video_test_screen: default ap = 0.0 button: action NullAction() hovered SetScreenVariable("ap", 1) unhovered SetScreenVariable("ap", 0) has fixed fit_first True add "video idle" add "video hover": alpha...