找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 9396|回复: 1

[有回复] 不知道为什么显示顺序错乱了

[复制链接]
发表于 2019-7-3 05:57:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×

bg的尺寸皆为1920X1080的大小,我想要达成一半显示电脑房的中间,一半显示图书馆的中间,然后在相关剧情结束之后推走不需要保留的场景,把剩下的角色挪到中间,
    image library:
        "bg 图书馆.png"
        crop (480, 0, 960, 1080)
        anchor (0.0, 0.0)

    show library behind textbox:
        xoffset 1920
    with None

    show bg 电脑房 behind library:
        xoffset -480
    show library:
        xoffset 960

    show 角色 普通 at right

到这里为止都还是正常达成需求的,显示一半一半的场景,但是问题在我想要推走场景的时候
我是这么写的↓

###尝试直接清空了图层再显示
    scene bg 图书馆:
        xoffset 480
    pass
    image computer:
        "bg 电脑房.png"
        crop (480, 0, 960, 1080)
        anchor (0.0, 0.0)
    show computer:
        xpos 0
    pass
####但是依然没用,bg 图书馆依然会盖住computer
####于是我尝试用behind语法
    show bg 图书馆 behind computer
    pass
    show 角色 at right
    with None
    pause 0.2
    show bg 图书馆 behind computer:
        xoffset 0
    show computer:
        xoffset -480
    show 角色 at center    with moveinright
    hide library
    hide computer
    with None

但是不知道为什么BG图书馆一定会覆盖在computer的图片上,不管调整顺序还是hide一次还是scene过还是用behind,图书馆都会盖住computer的图像……想知道为什么会发生这种情况,要怎么解决

发表于 2019-7-5 17:13:45 | 显示全部楼层
写脚本测试时的分辨率是1280*720,其它分辨率1920X1080的自行换算。
[RenPy] 纯文本查看 复制代码
## 定义图片.
## 怕萌新不知道图片放在images目录里是无需定义,还是定义下好理解。
image 111 = "111.png"
image 222 = "222.png"

## ATL
## 左边进场,左边出。
transform to_left:
    on show: # 显示时执行。
        xoffset -1280 ## 开始显示时位置。
        linear 0.5 xoffset -640 ## 线性移动,1280的一半分辨率为640。
    on hide: # 删除时执行
        linear 0.5 xoffset -1280

## 右边进场,右边出。
transform to_right:
    on show: # 显示时执行。
        xoffset 1280 
        linear 0.5 xoffset 640 
    on hide:
        linear 0.5 xoffset 1280

## 图片完全显示,坐标是一样为0。
transform Full:
    linear 0.5 xoffset 0

# 游戏在此开始。
label start:

    show 111 at to_left
    show 222 at to_right
    "图片左右进场"

    menu:
        "那边图留下,那边图退出?"

        "留下左边":
            show 111 at Full ## 留下的图。
            hide 222 at to_right ## 退出的图。

        "留下右边":
            show 222 at Full
            hide 111 at to_left

    "演示效果对吗?"

    # 此处为游戏结尾。
    return

角色移动应该会写吧。
还有就是脚本别用中文写,还有什么文件名、路径名。。。都别用中文,会出神秘BUG的。




评分

参与人数 1干货 +1 收起 理由
BuErShen + 1 鼓励原创!

查看全部评分

回复 支持 抱歉

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|RenPy中文空间 ( 苏ICP备17067825号|苏公网安备 32092302000068号 )

GMT+8, 2024-4-25 11:56 , Processed in 0.055445 second(s), 13 queries , File On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表