Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sorry it's me again (bet you're sick of me lol). 

One thing I've just noticed: I have a glow effect set to a state that is 100% removed on damage (showing a monster charging up, player wants to interrupt it or be shot with a powerful AoE attack).

Unfortunately, when that state is blown off by damage (no other states left) the glow effect remains glowing and seems stuck.

Deleted 11 days ago

Hmmm... working okay against the stock RMMV battle system.

Few quick questions:

1) What battle system are you using?

2) Is this a regular state or a passive one with conditions?

(2 edits)

Standard Front-View DBS, with Yanfly plugins

Regular state (12) with a custom apply effect which is added by a Passive state  (state 11 and 13 work in conjuction to apply it). 

State 13 is the passive control state, and 11 is the counting up state (neither 11 or 13 have the glow; the player doesn't see 13, and 11 acts as a warning with a minor bonus). I tried to post a screenie but itch has a hissy fit at it, so here's the comment boxes instead I guess.
-----

13 adds 12 when it's counted up enough stacks of 11. Monsters get 11 before they take an action each turn. Here's 13's effect :

<Custom Initiate Effect>
if (!user.isStateAffected(11)) { user.addState(11);}
user._tactical = user._tactical || 0;
user._tactical += 1;
user._tactical = Math.min(user._tactical, 3);
user.setStateCounter(11, user._tactical);
if (user._tactical >= 3) { user.addState(12);}
</Custom Initiate Effect> 

----
12 just makes sure 11 is gone (and has the glow of course):

<Custom Apply Effect>
user._tactical = 0;
user.setStateCounter(11, user._tactical);
user.removeState(11);
</Custom Apply Effect>
<State Filter: glow, 200, 0, 0, true>
----
And 11 just adds turn counter to actually tell the player how many stacks it has, and removes its own stacks if player interrupts it. Should overall be a flawless loop and it does work correctly, just the glow remains if the player is late addressing the issue.

<Custom Apply Effect>
target.addStateTurns(11, 1);
</Custom Apply Effect>

<Custom Remove Effect>
user._tactical = 0;
user.setStateCounter(11, user._tactical);
</Custom Remove Effect>

Hmmm... I cannot seem to re-create the issue in my test environment. I have a passive state checking the enemy HP and if below a certain amount the <Custom Initiate Effect> adds the charge up state with the <Custom Apply Effect> that adds stacks. The charge up state and all stacks are removed when they are hit. The filter is removed with it. It comes back if conditions are met and removed the same. It's a dumbed down version of what you are doing but shouldn't matter much since the main user.addState(x) calls are there. I suppose I could maybe add a call to remove all filters from a battler you could use if we can't figure it out?

That would be nice as a custom remove effect or something, yes, just as a safeguard. It's possible its one of the other things that's slightly altering sprite_battler having a fight with your effects.