Project1

标题: 用脚本调用出 显示选项 [打印本页]

作者: shabi    时间: 2014-8-11 11:14
标题: 用脚本调用出 显示选项
求各位大神帮助,如何用脚本调用出  显示选项   ?非常感谢

作者: taroxd    时间: 2014-8-11 11:18
参考 Game_Interpreter#command102
作者: shabi    时间: 2014-8-11 11:26
command102
wait_for_message
    setup_choices(@params)
    Fiber.yield while $game_message.choice?
如何设置着几个选项
作者: taroxd    时间: 2014-8-11 11:31
shabi 发表于 2014-8-11 11:26
command102
wait_for_message
    setup_choices(@params)

查看 setup_choice 方法
然后将里面的参数,根据英文猜测参数的含义,然后改成对应的字符串数组或者数字即可。
作者: shabi    时间: 2014-8-11 11:39
  def setup_choices(params)
    params[0].each {|s| $game_message.choices.push(s) }
    $game_message.choice_cancel_type = params[1]
    $game_message.choice_proc = Proc.new {|n| @branch[@indent] = n }
end
作者: shabi    时间: 2014-8-11 11:41
参数需要是个数组,而且还不能是字符串和常量




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