[Ren'py 教程] 持久化数据 多周目游戏开启的实现
黑凤梨A4
编辑于 2024年09月16日 09:33

关于持久化数据可以参考官方文档持久化数据章节。

https://www.renpy.cn/doc/persistent.html

代码块
JavaScript
自动换行
复制代码
default persistent.ending_unlocked = False

label start():
    scene bg company
    jump test1
    return

label test1():
    if persistent.ending_unlocked:
        "这是{color=#f00}第二次{/color}达到这个地方。"
    else:
        "这是{color=#FF0000}第一次{/color}达到这个地方。"
        $ persistent.ending_unlocked = True
    return
复制成功

更多的讨论可以参考下面的帖子:

https://lemmasoft.renai.us/forums/viewtopic.php?t=5865