Project1

标题: 关于在脚本中表示开关1为开的语句 [打印本页]

作者: hmjzwd    时间: 2016-2-11 13:21
标题: 关于在脚本中表示开关1为开的语句
本帖最后由 hmjzwd 于 2016-2-11 13:22 编辑

if input.press? [input::CTRL] and $game_switches[1] = ON
出错
$game_switches[1] == ON $game_switches[1]::ON均不对

原文是   
if Input.press?(Input::CTRL) and $game_switches[1] = ON
      terminate_message
还是那个跳对话的脚本……遇到选项也会跳过所以想加个开关,选择之前关闭以免跳过选项……
作者: 紫英晓狼1130    时间: 2016-2-11 14:08
应该不用那个== ON
作者: hmjzwd    时间: 2016-2-11 14:19
紫英晓狼1130 发表于 2016-2-11 14:08
应该不用那个== ON

什么意思……
作者: soulsaga    时间: 2016-2-11 14:28
小写on?
小写true?
作者: yang1zhi    时间: 2016-2-11 14:37
if里面判断相等要用两个=
就是==
开关好像不是用ON,是true
作者: 无忧谷主幻    时间: 2016-2-11 15:34
if $game_switches[1] == true  #开关1打开情况下
作者: 精灵使者    时间: 2016-2-11 15:48
嘛啊。
== true可以直接省去。
if input.press? [input::CTRL] and $game_switches[1]
就可以满足要求
作者: 有丘直方    时间: 2016-2-12 11:34
if (Input.press?(Input::CTRL) and $game_switches[1] == true)




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1