Ren'Py memo

Ren'Pyの個人的なメモ

Screen

renpy.get_screenで表示している画面を取得して何かする

資料 https://ja.renpy.org/doc/html/screen_python.html#renpy.get_screen 例1 screen notify(message): zorder 100 if renpy.get_screen("main_menu") != None: style_prefix "title_notify" elif renpy.get_screen("nvl") == None: style_prefix "notify…

スクリーンをshowまたはhideした時にactionを起こす

資料 https://ja.renpy.org/doc/html/screens.html#on https://ja.renpy.org/doc/html/atl.html#external-events https://ja.renpy.org/doc/html/screen_actions.html 例1 screen help(): on "show" action SetVariable("persistent.last_menu", "help") 表…

スクリーンのactionが思うように動かないとき

✖ action Confirm(_("戻りますか?"),[Jump("A"),SetVariable("B",True)]) こう書くと、変数の変更が飛ばされる。 〇 action Confirm(_("戻りますか?"),[SetVariable("B",True),Jump("A")]) actionの配列は左から実行される →Jump("nantoka")は最後に入れる…

今開いているscreenがどこか確認

参照:スクリーンと Python — Ren'Py Documentation screen game_menu(title, scroll=None, yinitial=0.0): if renpy.get_screen("history") != None: style_prefix "game_menu0" else: style_prefix "game_menu" 上記の書き方だとhistoryのscreenを開いてい…

screen内のデザインを変える

はじめにざっくり Ren'Pyはものすごくざっくり言うと、 シナリオを記述するlabelと画面を記述するscreenという種類に分かれています。label例 label op: $ quick_menu = True scene bg_room with dis "――時は十月の三十一日。\n 青葉も散った秋の頃、片田舎…