查看: 3760|回复: 1

[有事请教] 角色创建设置的头像与[SV]战斗图调用问题

[复制链接]
梦石
0
星屑
22794
在线时间
2623 小时
注册时间
2015-7-4
回帖
918
发表于 2017-11-4 11:21:06 | 显示全部楼层 |阅读模式

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

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

×
我做的游戏数据库中角色创建时设置的头像与[SV]战斗图在游戏中好像没出现过,请问有谁知道它们会在哪出现,想要在脚本中与事件中调用它们,代码应该怎么书写?请大神赐教,谢谢!
梦石
0
星屑
12161
在线时间
4435 小时
注册时间
2014-4-11
回帖
5616

开拓者

发表于 2017-11-4 11:36:43 | 显示全部楼层
脸图在状态栏会显示
SV战斗图在SV战斗中会使用$dataActors[id]._faceName   //这是头像图名字
$dataActors[id]._faceIndex  //这是头像图序列
$dataActors[id]._battlerName  //这是战斗图名字
默认脚本中显示头像的代码
  1. Window_Base.prototype.drawFace = function(faceName, faceIndex, x, y, width, height) {
  2.     width = width || Window_Base._faceWidth;
  3.     height = height || Window_Base._faceHeight;
  4.     var bitmap = ImageManager.loadFace(faceName);
  5.     var pw = Window_Base._faceWidth;
  6.     var ph = Window_Base._faceHeight;
  7.     var sw = Math.min(width, pw);
  8.     var sh = Math.min(height, ph);
  9.     var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
  10.     var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
  11.     var sx = faceIndex % 4 * pw + (pw - sw) / 2;
  12.     var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2;
  13.     this.contents.blt(bitmap, sx, sy, sw, sh, dx, dy);
  14. };
复制代码






回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部