Ok so basically I want a skill, when used, to check the current target of said skill for a certain state, if the check turns out to be false I want the target to have a state applied to them. Only issue is I dont know what script to plug in where it says "code" to get the result I want, can someone please provide me with the script I would plug into the notetag of this skill to have that happen when the skill is used?
MV [SOLVED] Need help with conditonal branch script/code in a skill's notetags
Javascript/Plugin SupportYou can try this:
With X being the conditional state, and Y being the state you wanna add (State ID)
Code:
if (!target.isStateAffected(x)){
target.addState(y);}
I'll try this later once im home!
Ok so it adds the state, BUT it does it DESPITE not having the state in the "if" script.
This is how I plugged it in so maybe I messed something up potentially?
Also how would I make it and "if else" statement as I want the state to be applied only when the current state isnt already applied to the target?
OH I GOT IT, NEVERMIND
I did some searching and got this to work the way I wanted to! Thank you for helping tho!
I did some searching and got this to work the way I wanted to! Thank you for helping tho!
Original thread: https://forums.rpgmakerweb.com/threads/solved-need-help-with-conditonal-branch-script-code-in-a-skills-notetags.179594/