Hello everyone!
I’m currently trying to set up a system where an attacker gets a state applied to them if their attack gets reflected due to an element reflect.
So basically: "If a reflect was triggered, then apply a state to the attacker."
I’m not very experienced with JavaScript, so I’m having some trouble figuring this out.
Here's what I have so far:
I’m using Yanfly's Element Core to reflect certain elements back to the attacker.
What I need help with:
How do I detect if a reflect actually happened?
And how do I make sure the state is applied to the attacker, not the target?
Any help or clarification would be greatly appreciated. Thank you so much in advance!
I’m currently trying to set up a system where an attacker gets a state applied to them if their attack gets reflected due to an element reflect.
So basically: "If a reflect was triggered, then apply a state to the attacker."
I’m not very experienced with JavaScript, so I’m having some trouble figuring this out.
Here's what I have so far:
I’m using Yanfly's Element Core to reflect certain elements back to the attacker.
// These are in the notebox of the state
<Element Reflect 1: +100%>
<Element Reflect 2: +100%>
<Element Reflect 3: +100%>
<Custom Respond Effect>
// or maybe it's <Custom React Effect>, I'm unsure which one works better for reflection
if (REFLECT TRIGGERED?) {
user.addState(452); // I want to apply this state to the attacker, but I'm not sure if "user" is the right one here.
}
</Custom Respond Effect>
<Element Reflect 1: +100%>
<Element Reflect 2: +100%>
<Element Reflect 3: +100%>
<Custom Respond Effect>
// or maybe it's <Custom React Effect>, I'm unsure which one works better for reflection
if (REFLECT TRIGGERED?) {
user.addState(452); // I want to apply this state to the attacker, but I'm not sure if "user" is the right one here.
}
</Custom Respond Effect>
What I need help with:
How do I detect if a reflect actually happened?
And how do I make sure the state is applied to the attacker, not the target?
Any help or clarification would be greatly appreciated. Thank you so much in advance!