设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1414|回复: 2
打印 上一主题 下一主题

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

[复制链接]

Lv2.观梦者 (版主)

迷途知返,恍如隔世

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

开拓者

跳转到指定楼层
1
发表于 2013-7-23 20:08:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我用的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号角色的名字。
球大神解答,今天第二问!

Lv1.梦旅人

梦石
0
星屑
50
在线时间
26 小时
注册时间
2013-7-14
帖子
54
2
发表于 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
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
31923
在线时间
5080 小时
注册时间
2012-11-19
帖子
4877

开拓者

3
发表于 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 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-25 16:34

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表