查看: 3661|回复: 1

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

[复制链接]
梦石
0
星屑
22578
在线时间
2605 小时
注册时间
2015-7-4
回帖
917
发表于 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  //这是战斗图名字
默认脚本中显示头像的代码
[pre lang="javascript"]Window_Base.prototype.drawFace = function(faceName, faceIndex, x, y, width, height) {
    width = width || Window_Base._faceWidth;
    height = height || Window_Base._faceHeight;
    var bitmap = ImageManager.loadFace(faceName);
    var pw = Window_Base._faceWidth;
    var ph = Window_Base._faceHeight;
    var sw = Math.min(width, pw);
    var sh = Math.min(height, ph);
    var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
    var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
    var sx = faceIndex % 4 * pw + (pw - sw) / 2;
    var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2;
    this.contents.blt(bitmap, sx, sy, sw, sh, dx, dy);
};
[/pre]





回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部