我的初始角色有8个选择。
然后我想让对话的时候不论是那个角色名字都直接用Pn来显示,
就在后面加了
(99变量是所选人物的序号,每个角色都是不同人物的)
“ if name_text == Player_Name
if $game_variables[99] =1
name_text = $game_actors[2].name
end
if $game_variables[99] =2
name_text = $game_actors[3].name
end
if $game_variables[99] =3
name_text = $game_actors[4].name
end
if $game_variables[99] =4
name_text = $game_actors[5].name
end
if $game_variables[99] =5
name_text = $game_actors[6].name
end
if $game_variables[99] =6
name_text = $game_actors[7].name
end
if $game_variables[99] =7
name_text = $game_actors[8].name
end
if $game_variables[99] =8
name_text = $game_actors[9].name
end
end
”
带入后,发现在游戏环境中,无论这个变量是多少,输pn进去都是9号角色的名字。
球大神解答,今天第二问!