| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2015-8-17 |
| 在线时间 | 182 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 182 小时
- 注册时间
- 2012-2-11
- 回帖
- 218
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 viktor 于 2012-11-14 17:56 编辑
看到兰兰今天屠版,我也来发个吐槽向的小玩意
应该有类似物的
而且这东西在VA里面应该已经没用了
在事件里可以任意制定参数的脚本。
比如 有的事件 在制定物品/角色/敌人的时候,只能从下拉框里选择,不能使用游戏变量的值来动态的决定
这个时候可以在这个事件的前面写上一个【脚本】事件,这个样子
【
> 脚本: 参数 x, value
参数 y, value
......
> 要执行的事件
】
(参数和x之间有空格)
这样就可以任意指定参数了。具体的参数对应的内容参见Interpreter
样例:
[pre lang="ruby" line="1"]$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[/pre]
注意要把所有的参数写在同一个【脚本】事件里
像这样是不行的
> 脚本:参数 1, 10
> 脚本:参数 2, 20
> 事件…… |
评分
-
查看全部评分
|