查看: 1024|回复: 2

[有事请教] 请教大佬SV模式的情况如何调整角色Y轴的间隔【已解决】

[复制链接]
梦石
0
星屑
538
在线时间
53 小时
注册时间
2023-3-4
回帖
16
发表于 2023-7-16 12:45:31 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 rmmzxs 于 2023-7-16 16:40 编辑

角色与角色之间的上下间隔,请教各位大佬,应该怎么调整,有使用VS全家桶插件,只找到一个调整整体XY坐标的设置,没有找到角色之间间隔调整的设置
梦石
0
星屑
4992
在线时间
1151 小时
注册时间
2014-5-9
回帖
124
发表于 2023-7-16 15:31:13 | 显示全部楼层
Visu_1_BattleCore 中 Actor Battler Settings 选项中 JS:Home Position
// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];

// Make Calculations
let x = Math.round((Graphics.width / 2) + 192)
x -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);
x += index * 32;
let y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);
y -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);
y += index * 48;

// Home Position Offsets
const offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i;
const xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));
const yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));
x = xOffsets.reduce((r, offset) => r + offset, x);
y = yOffsets.reduce((r, offset) => r + offset, y) - 800;

// Set Home Position
// 设置角色位置
if(index == 0){x=640,y=750};
if(index == 1){x=450,y=750};
if(index == 2){x=450,y=900};
if(index == 3){x=450,y=600};
if(index == 4){x=600,y=280};
this.setHome(x, y);
回复

使用道具 举报

梦石
0
星屑
538
在线时间
53 小时
注册时间
2023-3-4
回帖
16
 楼主| 发表于 2023-7-16 16:39:49 | 显示全部楼层
a965645462 发表于 2023-7-16 15:31
Visu_1_BattleCore 中 Actor Battler Settings 选项中 JS:Home Position
// Declare Constants
const spri ...

非常感谢大佬,明白了
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部