查看: 1967|回复: 2

[已经解决] FUKI对话角色名读取问题

[复制链接]

迷途知返,恍如隔世

梦石
0
星屑
488
在线时间
1355 小时
注册时间
2011-2-17
回帖
1173

开拓者

发表于 2013-7-23 20:08:32 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我用的fuki脚本可以设定主角名

“Player_Name = 'pn' # 代表主角名字的字符”

我的初始角色有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号角色的名字。
球大神解答,今天第二问!
梦石
0
星屑
50
在线时间
26 小时
注册时间
2013-7-14
回帖
50
发表于 2013-7-23 20:28:51 | 显示全部楼层
本帖最后由 国产刘备 于 2013-7-23 20:35 编辑

actors_show
  actorsname(v)

    if v=1
          name_text = $game_actors[v].name
    end
  end
end
在事件里 调用 $name= actors_show.new
$name.actorsname($game_variables[3])

你要在判断前给才行 $game_actors[v].name
if name_text == Player_Name就没必要了 多余的
因为你最后给的都是$game_actors[9].name
第一次运行 name_text =“” Player_Name=“”
进入判断内 name_text =角色3 的名字
假如你不存档一开始给$game_variables[4]他就一直显示5号角色的名字
是if name_text == Player_Name的问题

点评

谢啦,有点复杂,但是问题解决了  发表于 2013-7-23 20:57
回复

使用道具 举报

梦石
0
星屑
34467
在线时间
5096 小时
注册时间
2012-11-19
回帖
4715

开拓者

发表于 2013-7-23 20:45:52 | 显示全部楼层
本帖最后由 芯☆淡茹水 于 2013-7-23 20:50 编辑

这样,用下面这段把你上面的全部替换
  1. if name_text == Player_Name
  2.   name_text = $game_actors[$game_variables[99] + 1].name
  3. end
复制代码
还有:=  和 ==  要区分开。

点评

恩……你的方法更简单一点!问题解决了  发表于 2013-7-23 20:56

评分

参与人数 2星屑 +120 收起 理由
︶ㄣ牛排ぶ + 100 认可答案
Anson + 20 认可答案

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部