I want a skill to have a different effect if the user is actor. I used the script ''a.isActor()'' in my common even but it is not
working.
Does someone know how to solve this?
Thanks
working.
Does someone know how to solve this?
Thanks
forums.rpgmakerweb.com
(a._actorId)?/*Actor Action*/:/*Enemy Action*/;(a._actorId)?alert("Actor"):alert("Enymy");200 + a.mat
if(a._actorId){$gameTemp.reserveCommonEvent(1)}200 + a.mat
$gameParty.gainItem($dataItems[itemId], n);if(a._actorId){$gameParty.gainItem($dataItems[5], 99)}200 + a.mat
Game_Action.prototype.evalDamageFormula = function(target) {
try {
var item = this.item();
var a = this.subject(); //Here
var b = target;
var v = $gameVariables._data;
var sign = ([3, 4].contains(item.damage.type) ? -1 : 1);
var value = Math.max(eval(item.damage.formula), 0) * sign;
if (isNaN(value)) value = 0;
return value;
} catch (e) {
return 0;
}
};
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/script-to-check-if-user-of-a-skill-is-an-actor.141045/