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.
define config.default_fullscreen = True
screen test:
button:
xfill True
yfill True
action NullAction()
vbox:
align(.5, .5)
textbutton "next stage (dismiss)" action Function(renpy.end_interaction, True) text_size 77 xalign .5
hbox:
xalign .5
textbutton "save" action QuickSave() text_size 77
null width 422
textbutton "load" action QuickLoad(confirm=False) text_size 77
hbox:
xalign .5
if change:
textbutton "–" action SetVariable("x", x - 1), Function(renpy.retain_after_load) text_size 222
label "[x]" text_size 222
if change:
textbutton "+" action SetVariable("x", x + 1), Function(renpy.retain_after_load) text_size 222
label start:
$ change = True
$ x = 0
$ renpy.retain_after_load()
show screen test
"Stage 1. If you save the game to a slot, then after loading from the slot the variable will be reset.\nPress 'save' and then 'load'."
$ change = False
"Stage 2. The variable is now updated and can be stored in the slot.\nPress 'save' and then 'load'."
return
What should I do to keep store variables in a slot without dismiss (renpy.end_interaction)? The game should remain at stage 1.
(renpy.retain_after_load doesn't work...)
PyTom wrote: ↑Mon Nov 06, 2023 1:05 am
Can you check out the latest nightly, from https://nightly.renpy.org ? There have been a number of fixes in this area.
Doesn't work =(
Last edited by barsunduk on Tue Nov 21, 2023 2:39 pm, edited 1 time in total.