[YEP - Buffs & States Core] Is it possible to manually call for state icon refresh?

Hello,


I have a state that is applied to two enemies.


When one of the enemies dies, it is removed on both.


That does work, however, the state icon is present on the enemy until it is its turn again (even though the enemy does not actually have the state).


I removed the state by doing a: enemy.eraseState(x) call as part of the custom respond effect. If I could a call here to enemy.refreshStateIcons() it would be a trivial fix.


Again, it does work, just takes a while to visually update.


Any help would be greatly appreciated!
l would need to know if the state is not used anywhere else or if both enemies have specific indexes.


for specific indexes


<Custom Respond Effect>


if (target.hp === 0) {


$gameTroop.members()[INDEXID].removeState(x)


$gameTroop.members()[INDEXID].removeState(x)


}


</Custom Respond Effect>


If it still doesn't refresh properly, l suggest using DreamX sprite battler icons which is 100 times better than any visual plugin Yanfly can offer.
l would need to know if the state is not used anywhere else or if both enemies have specific indexes.


for specific indexes


<Custom Respond Effect>


if (target.hp === 0) {


$gameTroop.members()[INDEXID].removeState(x)


$gameTroop.members()[INDEXID].removeState(x)


}


</Custom Respond Effect>


If it still doesn't refresh properly, l suggest using DreamX sprite battler icons which is 100 times better than any visual plugin Yanfly can offer.



Weird, removeState works the same as eraseState.


But unfortunately, it works exactly the same.


State icons are not refreshed until it is the enemy's turn.


Is this the DreamX plugin you are talking about?
Yeah, l don't know which plugin you use to show states but it should refresh automatically hence why there no refresh command.


https://raw.githubusercontent.com/DreamXRMMV/Rpg-Maker-MV/master/DreamX_BattlerSpriteIcons.js this one

Original thread: https://forums.rpgmakerweb.com/threads/yep-buffs-states-core-is-it-possible-to-manually-call-for-state-icon-refresh.71004/