I want to do something similar to a Charged Creeper from Minecraft, adding a state when hit with an element
Looking for code for a notetag that applies state 149 to enemy 95 when hit with element 4.
I have most Yanfly plugins if needed
the regular way to do it would be from the other side:
give all attacks of element 4 the ability to inflict state 149, and have the enemies that should not get state 149 be immune to that state.
although depending on your enemies and elements that might be a lot of work done that way.
another method (that is ideal for single enemy types) is damage coding. Basically checking in the damage formula if the enemy is of the specific ID and if yes, add that state by damage code in the skills.
neither method requires a plugin.
<Custom Element React 4>
enemy.addState(149);
</Custom Element React>
This should work with plugins and for some reason it is not. Its not my plugin order, and the required plugins ARE enabled. It does this all the time, just choosing not to work because it doesnt feel like it.
<Custom Respond Effect>
if (this.isDamage() && this.getItemElements().contains(4))
target.addState(149)
<Custom Respond Effect>>
You said this notetag goes into the state? How is it supposed to know when to apply the state to the enemy?
I was looking for a notetag for an enemy, so when the enemy gets hit with a specific element, the state applies and then effects happen. But not to every enemy, only ones with the notetag, that why i cant just put a state on a skill