help with Phoenix Ring tag code

hi from yanfly's phoenix ring tag code.....

<Custom Apply Effect>

if (target.isActor()) {

var ring = $dataArmors[4];

if (target.hasArmor(ring)) {

target.discardEquip(ring);

target.startAnimation(42);

var hp = Math.floor(target.mhp * 0.25);

target.gainHp(hp);

target.startDamagePopup();

}

}

</Custom Apply Effect>

the rings ID=4      armor type=Ring      equipment type=Ring

problem = on death without the ring i still get the auto revive effect because the tag above is on the fallen state so death with or without the Phoenix Ring equipped still = auto revive at least once

how do i fix this?

also how i set it so it doesnt break the ring after auto revive happens but the effect will only happen once per battle?

http://yanfly.moe/2016/01/06/tips-tricks-phoenix-ring/

 
well, stopping it from breaking is easy I would think.

<Custom Apply Effect>if (target.isActor()) { var ring = $dataArmors[1541]; if (target.hasArmor(ring)) { target.startAnimation(42); var hp = Math.floor(target.mhp * 0.25); target.gainHp(hp); target.startDamagePopup(); }}</Custom Apply Effect>However, that wont stop it from activating more than once per turn.  That I'm not entirely sure of, but I'm sure it would involve something like...

target.removeEquip(ring);inserting that above target.startAnimation and it should just unequip the ring.  should anyways.  

anyways, as for why its not working,  I would assume you have the note tag in the wrong place.  Did you put the notetag evaluation in the rings notetag box?  because I'm pretty sure it goes in that notetag box.  Other than that, I dunno.
well, stopping it from breaking is easy I would think.

<Custom Apply Effect>if (target.isActor()) { var ring = $dataArmors[1541]; if (target.hasArmor(ring)) { target.startAnimation(42); var hp = Math.floor(target.mhp * 0.25); target.gainHp(hp); target.startDamagePopup(); }}</Custom Apply Effect>However, that wont stop it from activating more than once per turn.  That I'm not entirely sure of, but I'm sure it would involve something like...

target.removeEquip(ring);inserting that above target.startAnimation and it should just unequip the ring.  should anyways.  

anyways, as for why its not working,  I would assume you have the note tag in the wrong place.  Did you put the notetag evaluation in the rings notetag box?  because I'm pretty sure it goes in that notetag box.  Other than that, I dunno.
well what i saw in the video you put the tag code in the fallen state and set what the rings id is in the tag of the state but ill give this a try thanks for your feedback 🙂
well what i saw in the video you put the tag code in the fallen state and set what the rings id is in the tag of the state but ill give this a try thanks for your feedback 🙂
it goes on state and not on skill right? because it doesnt work either way and causes an error

Original thread: https://forums.rpgmakerweb.com/threads/help-with-phoenix-ring-tag-code.54606/