When using $gameTemp.lastActionData(4) to gather the actorTarget, it always returns the other actor (there are only 2) no matter who is targeted. If actor 2 targets actor 2 (self) it returns 1.
How do I determine if a heal skill is targeting self, the actor that's casting it?
I need this data before the action is performed and after input is finished.
Can you show where/how you're using it? That should be the correct usage.
Is it a skill for any ally and you're choosing the same actor, or is it a scope of User?
It's a skill for any ally, I need to determine if the caster self targets.
I've moved it dozens of times trying to find the best place to query. This is what my latest attempt looks like:
Game_Action.prototype.updateLastTarget = function(target) {
if (target.isActor()) {
$gameTemp.setLastTargetActorId(target.actorId());
if($gameTemp.lastActionData(4) === 2) {$gameVariables.setValue(24, 1)};
console.log("last selected", $gameTemp.lastActionData(4));
} else {
$gameTemp.setLastTargetEnemyIndex(target.index() + 1);
}
};
I might want to mention that it's a TP skill.
Yes and no.
I do only want to determine if actor 2 is self targeting. (there's only actor 1 and 2 and they will always be the same actor id), but I'm not limiting the effects to the damage formula.
I need the data to determine how the action battle sequence will play out using VS Battle core.