REN`PY中怎么实现条件choice?

请求帮助ren`py
浏览数 - 801发布于 - 2025-07-08 - 21:05

本来$符可以用来运行python代码,但是放在menu语句中就容易出错,包括if语句,又不想搞太多label费空间,求解。 define se = 1 menu choose: "选项主题" "choice1": "执行1内容" $ if se==1: "choice2": "执行2内容" 报错内容: Line is indented, but the preceding one-line python statement statement does not expect a block Please check this line's indentation You may have forgotten a coion()

3 条回复

Bakasatang
发布于 2025-07-10 - 11:35
text
你缩进有问题吧
Mincx
发布于 2025-07-29 - 22:09
回复 @Bakasatang#1

你缩进有问题吧

先if再缩进的,但是他就是不能运行

Bakasatang
发布于 2025-08-17 - 20:31
回复 @Mincx#2

$ if是什么写法,,if就if

eg:

renpy
    if money <= 0:
        jump End4

$是单行python语句;搞好感度之类的

renpy
 $ capture = 0.66
。。。。 
$ capture_dice=renpy.random.random()
    if capture_dice < capture:
        jump End5

(。>︿<。) 已经一滴回复都不剩了哦~