shaynec1981

Regular
Regular
Joined
Jun 10, 2014
Messages
91
Reaction score
22
First Language
English
Primarily Uses
Is there a difference to states when applying them directly to enemies through troop battle events or through a plugin with the 


$gameTroop.members()[_targetIndex].addState(_stateId);


 type format? I'm having a problem with the state not removing itself. If I apply the same state to an enemy through the battle events page, the auto-removal timing that I have set for 3-5 turns works as it should. However if I apply the same exact state (and it IS only applying it once. I checked to make sure my code wasn't reiterating and just constantly apply the state) by using 


$gameTroop.members()[_targetIndex].addState(_stateId);


the state never actually goes away. Any ideas on what I could be missing?


*Edit - Well, that's weird. Apparently I was passing _stateId as a string and that was still allowing the state to be applied. Once I passed it as


addState(Number(_stateId));


instead, the auto-removal timing worked as it should. This should really have some kind of fail-safe as it's very easy to miss the fact that the ID is passed as a string instead of a number because the state still gets applied...
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Skill Tutor Scene is all but done!


1696133612827.png
HawkZombie wrote on Slaughty's profile.
SLAUGHTY!
I remember hearing some guy playing Warhammer Fantasy Battle and getting his butt kicked by a girl who painted all her dwarves pink. She kept calling them her 'Little Gimli's.
Every JRPG needs a mandatory cliff scene.

My friend JBO, is hosting a history-based RPG Maker Game Jam, so if you are interested, you can check it out below.

Forum statistics

Threads
134,953
Messages
1,252,305
Members
177,804
Latest member
takkaaa
Top