马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 百合子233 于 2023-8-10 19:44 编辑
我在options文件里定义了三个新图层,代码如下:
define config.layers = ['master', 'background', 'middle', 'forward', 'transient', 'screens', 'overlay']
再在label里使用,代码如下:
show heilong_ditu onlayer background:
zoom 0.4
但是貌似图层定义不成功,报错如下:
[code]
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/rpy/script.rpy", line 37, in script
show heilong_ditu onlayer background:
Exception: Trying to add something to non-existent layer 'background'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/rpy/script.rpy", line 37, in script
show heilong_ditu onlayer background:
File "D:\renpy\renpy-8.1.1-sdk\renpy\ast.py", line 1428, in execute
show_imspec(self.imspec, atl=getattr(self, "atl", None))
File "D:\renpy\renpy-8.1.1-sdk\renpy\ast.py", line 1391, in show_imspec
renpy.config.show(name,
File "D:\renpy\renpy-8.1.1-sdk\renpy\exports.py", line 759, in show
sls.add(layer, img, key, zorder, behind, at_list=at_list, name=name, atl=atl, default_transform=default_transform, transient=transient)
File "D:\renpy\renpy-8.1.1-sdk\renpy\display\core.py", line 1210, in add
raise Exception("Trying to add something to non-existent layer '%s'." % layer)
Exception: Trying to add something to non-existent layer 'background'.
求助大佬,到底是哪里出了问题?
|