- Joined
- Aug 18, 2020
- Messages
- 18
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
Hello, I'm trying to get a Yanfly Action Sequence to work in tandem with YEP_ElementCore.
I'm trying to accomplish a sequence after attacks where if the element is super-effective, then the user gains a status effect. However, if the element is blocked or nullified in any way then the opponent gains the status effect instead. This system is identical to the Smirk status from SMT IV.
However, I've so far been unable to get it to work as an action sequence and I suspect it's because I'm using the wrong functions/variables/whatever and structuring something wrong. If anybody knows what to fix about the action sequence below to achieve the desired effect, please tell me.
(my battle system is frontview rather than sideview, if that also clears up any questions)
I'm trying to accomplish a sequence after attacks where if the element is super-effective, then the user gains a status effect. However, if the element is blocked or nullified in any way then the opponent gains the status effect instead. This system is identical to the Smirk status from SMT IV.
However, I've so far been unable to get it to work as an action sequence and I suspect it's because I'm using the wrong functions/variables/whatever and structuring something wrong. If anybody knows what to fix about the action sequence below to achieve the desired effect, please tell me.
(my battle system is frontview rather than sideview, if that also clears up any questions)
Code:
<Target Action>
action animation
wait for animation
action effect
\\Check if attack is super-effective. If so add buff state to user.
if result.ElementRate > 1
animation 141: user, mirror
add state 7: user, show
\\Check if attack is blocked. If so add buff state to target.
else if result.ElementRate = 0
animation 141: target
add state 7: target, show
\\Check if attack is absorbed. If so add buff state to target.
else if obj.ElementAbsorb
animation 141: target
add state 7: target, show
\\Check if attack is reflected. If so add buff state to target.
else if obj.ElementReflect
animation 141: target
add state 7: target, show
\\If the attack hits normally, then nobody gets the buff.
else
end
death break
</Target Action>


