Project1
标题:
公共事件中,怎么调取角色信息?
[打印本页]
作者:
aaaassss123
时间:
2016-1-13 17:03
标题:
公共事件中,怎么调取角色信息?
公共事件中,怎么调取角色信息?不是把角色信息界面调取出来,界面本身我是拿图画的,但是无法实时的调取角色的信息?请问有什么办法调取吗
作者:
汪汪
时间:
2016-1-14 09:04
实时的调取?
var id = $gameParty.allMembers()[i]
var actor = $gameActors.actor(id);
Game_Actor.prototype.actorId = function() {
return this._actorId;
};
//角色
Game_Actor.prototype.actor = function() {
return $dataActors[this._actorId];
};
//名称
Game_Actor.prototype.name = function() {
return this._name;
};
//设置名称
Game_Actor.prototype.setName = function(name) {
this._name = name;
};
//昵称
Game_Actor.prototype.nickname = function() {
return this._nickname;
};
//设置昵称
Game_Actor.prototype.setNickname = function(nickname) {
this._nickname = nickname;
};
//侧面图
Game_Actor.prototype.profile = function() {
return this._profile;
};
//设置侧面图
Game_Actor.prototype.setProfile = function(profile) {
this._profile = profile;
};
//人物名称
Game_Actor.prototype.characterName = function() {
return this._characterName;
};
//人物索引
Game_Actor.prototype.characterIndex = function() {
return this._characterIndex;
};
//脸名称
Game_Actor.prototype.faceName = function() {
return this._faceName;
};
//脸索引
Game_Actor.prototype.faceIndex = function() {
return this._faceIndex;
};
//战斗者名称
Game_Actor.prototype.battlerName = function() {
return this._battlerName;
};
//当前经验
Game_Actor.prototype.currentExp = function() {
return this._exp[this._classId];
};
//当前等级经验
Game_Actor.prototype.currentLevelExp = function() {
return this.expForLevel(this._level);
};
//下一级经验
Game_Actor.prototype.nextLevelExp = function() {
return this.expForLevel(this._level + 1);
};
//下一级需要经验
Game_Actor.prototype.nextRequiredExp = function() {
return this.nextLevelExp() - this.currentExp();
};
//最大等级
Game_Actor.prototype.maxLevel = function() {
return this.actor().maxLevel;
};
//是最大等级
Game_Actor.prototype.isMaxLevel = function() {
return this._level >= this.maxLevel();
};
//装备槽
Game_Actor.prototype.equipSlots = function() {
var slots = [];
for (var i = 1; i < $dataSystem.equipTypes.length; i++) {
slots.push(i);
}
if (slots.length >= 2 && this.isDualWield()) {
slots[1] = 1;
}
return slots;
};
//装备
Game_Actor.prototype.equips = function() {
return this._equips.map(function(item) {
return item.object();
});
};
//武器
Game_Actor.prototype.weapons = function() {
return this.equips().filter(function(item) {
return item && DataManager.isWeapon(item);
});
};
//防具
Game_Actor.prototype.armors = function() {
return this.equips().filter(function(item) {
return item && DataManager.isArmor(item);
});
};
//有武器
Game_Actor.prototype.hasWeapon = function(weapon) {
return this.weapons().contains(weapon);
};
//有防具
Game_Actor.prototype.hasArmor = function(armor) {
return this.armors().contains(armor);
};
//是角色
Game_Actor.prototype.isActor = function() {
return true;
};
//朋友小组
Game_Actor.prototype.friendsUnit = function() {
return $gameParty;
};
//对手小组
Game_Actor.prototype.opponentsUnit = function() {
return $gameTroop;
};
//索引
Game_Actor.prototype.index = function() {
return $gameParty.members().indexOf(this);
};
//是战斗成员
Game_Actor.prototype.isBattleMember = function() {
return $gameParty.battleMembers().contains(this);
};
//是编队改变可以
Game_Actor.prototype.isFormationChangeOk = function() {
return true;
};
//当前职业
Game_Actor.prototype.currentClass = function() {
return $dataClasses[this._classId];
};
//是职业
Game_Actor.prototype.isClass = function(gameClass) {
return gameClass && this._classId === gameClass.id;
};
//技能
Game_Actor.prototype.skills = function() {
var list = [];
this._skills.concat(this.addedSkills()).forEach(function(id) {
if (!list.contains($dataSkills[id])) {
list.push($dataSkills[id]);
}
});
return list;
};
//可用技能
Game_Actor.prototype.usableSkills = function() {
return this.skills().filter(function(skill) {
return this.canUse(skill);
}, this);
};
//有无武器
Game_Actor.prototype.hasNoWeapons = function() {
return this.weapons().length === 0;
};
//赤手元素id
Game_Actor.prototype.bareHandsElementId = function() {
return 1;
};
//是学习了的技能
Game_Actor.prototype.isLearnedSkill = function(skillId) {
return this._skills.contains(skillId);
};
复制代码
作者:
aaaassss123
时间:
2016-1-14 09:32
汪汪 发表于 2016-1-14 09:04
实时的调取?
我现在是用事件写的界面,脚本来写界面,自己没那么大的本事啦,就试着用公共事件来写界面。调取这些信息的话,能规定他们的坐标和长宽高吗?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1