加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 本帖最后由 viktor 于 2012-11-14 17:56 编辑  
 
看到兰兰今天屠版,我也来发个吐槽向的小玩意 
应该有类似物的 
 
而且这东西在VA里面应该已经没用了 
 
在事件里可以任意制定参数的脚本。 
比如 有的事件 在制定物品/角色/敌人的时候,只能从下拉框里选择,不能使用游戏变量的值来动态的决定 
这个时候可以在这个事件的前面写上一个【脚本】事件,这个样子 
 
【 
> 脚本: 参数 x, value 
             参数 y, value 
             ......  
> 要执行的事件 
】 
(参数和x之间有空格) 
这样就可以任意指定参数了。具体的参数对应的内容参见Interpreter 
 
样例: 
 
 
 
 
 
$next_event_param = {} # [index, value] class Interpreter   alias al_execute_command execute_command   def execute_command     $next_event_param.each{|id, value|       @list[@index].parameters[id]=value     }     $next_event_param.clear     al_execute_command   end     def 参数(*args) # 从1开始!!     while args.size>0       index = args.shift       value = args.shift       $next_event_param[index-1]=value     end   end end 
 
 $next_event_param = {} # [index, value]  
class Interpreter  
  alias al_execute_command execute_command  
  def execute_command  
    $next_event_param.each{|id, value|  
      @list[@index].parameters[id]=value  
    }  
    $next_event_param.clear  
    al_execute_command  
  end  
   
  def 参数(*args) # 从1开始!!  
    while args.size>0  
      index = args.shift  
      value = args.shift  
      $next_event_param[index-1]=value  
    end  
  end  
end  
 
  
 
 
注意要把所有的参数写在同一个【脚本】事件里 
像这样是不行的 
> 脚本:参数 1, 10 
> 脚本:参数 2, 20 
> 事件…… |