alexncf125 发表于 2021-8-15 09:57
$game_variables[x]
x指变量的ID
alexncf125 发表于 2021-8-15 09:57
$game_variables[x]
x指变量的ID(不含开头的0, 即比如0046时, x取46)
BLUEONE 发表于 2021-8-15 11:17
呃。。。又打扰了。
如何让在事件里使用脚本读取该事件的X,Y呢?
BLUEONE 发表于 2021-8-15 11:17
呃。。。又打扰了。
如何让在事件里使用脚本读取该事件的X,Y呢?
alexncf125 发表于 2021-8-16 08:02
数组 = ["a", "b", "c"]
$game_variables[1] = 2
内容 = 数组[$game_variables[1]]
捕获.PNG (4.24 KB, 下载次数: 39)
调试结果:nill
BLUEONE 发表于 2021-8-16 08:34
但为什么 $switch[get_character(0).id -=66] = 0 会报错呢?是不是因为数组【】里的内容不能是变量?
( ...
alexncf125 发表于 2021-8-16 08:44
$switch = Array.new(100)
$switch[get_character(0).id - 66] = 0
p $switch
alexncf125 发表于 2021-8-16 08:44
$switch = Array.new(100)
$switch[get_character(0).id - 66] = 0
p $switch
捕获.PNG (6.96 KB, 下载次数: 41)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |