Hello!
I have been trying out some new things for my game. Right now, I'm trying to make an item that can only be used in battle, heals 5HP every turn until the battle is over or the player runs out of gold, and every turn, drains 1 gold from the player after use.
I set up a common event to deal with the gold, but I want the item to add a state to the character that runs every turn, and activates the common event. Is there a way I can run a common event in a state?
Thanks in advance!
Is the stateId replace with the id of the state? Cuz that maybe you're problem.
Why can't you just set it up via troop events? On each turn, check to see if the character is affected by the state. If they are, check how much gold they have. If they have enough, decrease gold and increase HP.
I don't see why you have to rely on a script for this.
I know that it hasn't been three days exactly yet, but I'll just bump this thread up anyway.
Again, bump.
...I'm so lonely here...
Unfortunately I cannot help with any plugin issues right now, but you could save some of the work using Shaz's solution for now if you put all of your code into a Common Event (and call that event from the troop page using the "Call Common Event" command).
This way you'd still have to copy the troop event page for every troop, but modifications to your state as well as additional similar states can be done by changing the common event without the need of touching the troop events ever again.
In my experience, the gradient error messages only come up when you end up accidentally dealing with an hp/mp or I guess tp value that isn't a whole number. The code I gave you for the state itself wouldn't cause that, as it isn't dealing with any of those values, though.
I am not sure what the other error message indicates. It seems like maybe both errors are pointing towards a battler or sprite that doesn't exist, or was improperly created by a plugin, but buffs/states core doesn't really deal with that. It could be a plugin incompatibility.