def base_tizhi
case @actor_id.to_i
when 1
n = $game_variables[1]
return n
when 2
n = $game_variables[2]
return n
when 3
n = $game_variables[3]
return n
when 4
n = $game_variables[4]
return n
when 5
n = $game_variables[5]
return n
......
......
......
......
end
end [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~作者: 八云紫 时间: 2008-11-7 23:19
def base_tizhi
return $game_variables[@actor_id];
end 作者: typhon_524 时间: 2008-11-7 23:24
如果我只希望1~100号角色的某项能力值赋予1~100号变量,而101以后编号角色的该项能力不赋予任何变量的话,应该怎么写?作者: clap_pl 时间: 2008-11-7 23:46
for i in 1..100
$game_actors.cp = $game_variables#假设能力值名定义为cp
end [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~作者: redant 时间: 2008-11-8 00:20
def base_tizhi
if @actor_id.to_i != nil
for i in 1...100
n = $game_variables
i+=1
end
return n
else
return 0
end
end