【问题标题】:Is it possible to implement a splashscreen in Ren'Py?是否可以在 Ren'Py 中实现启动画面?
【发布时间】:2018-09-26 22:08:28
【问题描述】:

是否仍然可以在最新版本的 Ren'Py 中实现启动画面?我搜索了所有关于使用闪屏的论坛;但是,所有这些都已过时或不起作用。下面我包含了来自历史悠久的 Ren'Py wiki 页面的代码 sn-p(在最新版本中不起作用)。我在 Ren'Py 网站上找不到任何其他官方文档。在这一点上,我有点绝望。我怎么能做到这一点?

label splashcreen:
  scene black
  with pause (1.0)

  show text "splash text" with dissolve
  with pause (2.0)

  hide text with dissolve
  with pause (1.0)

return

【问题讨论】:

  • 你试过用label splashscreen:而不是label splashcreen:吗?您的代码中似乎存在拼写错误(省略了s

标签: python splash-screen renpy


【解决方案1】:

这只是拼写的问题。检查启动画面的拼写。你忘了第三个's'。闪屏,而不是闪屏。此外,您不需要 with pause,只需使用 pause。这是经过适当更改的代码。我在最新版本的 Ren'Py (7.3.2) 上对其进行了测试。

label splashscreen:
     scene black
     pause 1.0

     show text "splash text" with dissolve
     pause 2.0

     hide text with dissolve
     pause 1.0

     return

【讨论】:

  • 这个问题是关于实施帮助的。如果您没有回答问题,请将您的消息添加为评论。
  • 我在答案中添加了更多细节。 Ty 的建议 :-)
【解决方案2】:

如果您想在 Ren'py 读取脚本并启动游戏时显示图像,您可以使用 Renpy 的预启动功能。

要在引擎启动时显示这些和图像,请创建一个名为 presplash.png(或 presplash.jpg)的图像文件,并将其保存到游戏目录中。

【讨论】:

    【解决方案3】:

    我假设您希望在菜单之前出现 启动画面,对吧?

    如果是这样,请尝试:

    label splashscreen: # create a label for your splashscreen
    
        play music mysong # This is optional
        scene black
        with Pause(5) # You can change the pause time
    
        show text "Lorem Ipsum..." with dissolve
        with Pause(5)
        hide text with dissolve
        with Pause (1)
        show text "My" with dissolve # You can change this to an image if you have one
        with Pause(6) # This pauses the current shown text
        hide text with dissolve
        with Pause(2)
    
    return # And of course the Return will take you to the main menu screen
    

    【讨论】:

      猜你喜欢
      • 2019-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-31
      • 1970-01-01
      • 2022-08-19
      相关资源
      最近更新 更多