I want an item to apply a state to a target based on who used the item. (not who it's used on.)
Thank you in advance ^w^
Thank you in advance ^w^
a.addState(42); your_formula_here
I'm not good with Java. I don't know how to use this.
a.addState(42); before it in the formula box. Also, replace 42 with the number of the state you want to add.I'm confused.
<After Eval>
if (b.result().isHit()) {
let effect = {
code: Game_Action.EFFECT_ADD_STATE,
dataId: (user === $gameActors.actor(1) ? 42 : 43),
value1: 1.0
};
this.applyItemEffect(target, effect);
}
</After Eval>
That wasn't what I got form your initial description. (By the way, apparently I pasted in the wrong code without even noticing earlier – I edited my previous post to fix it.)
a.addState(a.actor().meta.something); a.atk * 2 etc etc
<something:12> to each actor that can use the skill, where 12 is the state ID. You can replace "something" with any name you want – it just needs to match exactly with the note tag. As written above, it can only contain letters and numbers before the colon. If you want to put spaces or anything else in it, you can write it like this instead:a.addState(a.actor().meta['something']); a.atk * 2 etc etc
Original thread: https://forums.rpgmakerweb.com/threads/items-that-give-states-based-on-caster-not-target.181863/