- Joined
- Jul 3, 2014
- Messages
- 6
- Reaction score
- 6
- First Language
- English
- Primarily Uses
Edit: Mystery solved ! Look below for fixes. Post #11 may be the better fix.
---------------------------------------------------------------------------------------------------------------
Some of my posts were done tired so let me clarify what the problem was.
By default. The Game_Battler definition "on_turn_end" ended the turn then updated and removed states. So if you had a state that lasted 2 turns, the third turn is when it was marked as being removed.
When you used the add_state command the first thing it does is check if you are not allowed to add that state. One of the conditions stopping you from adding the state was the state_removed definition. The state_removed definition checked if the state had been removed on the "same action". So you couldn't apply a state after it had just expired, because it was still on the list of states that had been removed.
----------------------------------------------------------------------------------------------------------------
I have a skill that damages the enemy and adds a state to the user using a custom formula.
The problem is that I can't get the state to be added consecutively.
Try it yourself, load up a new project. Change the state hp regen to 1-1 turns. In your attack custom formula enter "a.add_state(14);30"
Go to battle test and only use your basic attack and see for yourself that it doesn't work, or I'm crazy.
I'm not savvy enough with the game's scripts to know what I could tweak to change this but I have some clues.
Clue A: The problem is unique to a.add_state. b.add_state in the same syntax will apply a state consecutively. Whether the skill damages or heals.
Clue B: You can apply a state consecutively using a.add_state or b.add_state if the scope of the skill is the user or allies. Damaging or healing.
Clue C: a.add_state works again the turn after it failed to apply the state.
Clue D: The number of turns doesn't matter. The turn after it expires it fails to apply the state.
Clue E: If you don't go first during the turn the state IS applied.
I'm not going to be using outside scripts for this. I'm only modifying the default rpgmaker scripts.
Edit: Video http://youtu.be/HO8NzYLyO8M
---------------------------------------------------------------------------------------------------------------
Some of my posts were done tired so let me clarify what the problem was.
By default. The Game_Battler definition "on_turn_end" ended the turn then updated and removed states. So if you had a state that lasted 2 turns, the third turn is when it was marked as being removed.
When you used the add_state command the first thing it does is check if you are not allowed to add that state. One of the conditions stopping you from adding the state was the state_removed definition. The state_removed definition checked if the state had been removed on the "same action". So you couldn't apply a state after it had just expired, because it was still on the list of states that had been removed.
----------------------------------------------------------------------------------------------------------------
I have a skill that damages the enemy and adds a state to the user using a custom formula.
The problem is that I can't get the state to be added consecutively.
Try it yourself, load up a new project. Change the state hp regen to 1-1 turns. In your attack custom formula enter "a.add_state(14);30"
Go to battle test and only use your basic attack and see for yourself that it doesn't work, or I'm crazy.
I'm not savvy enough with the game's scripts to know what I could tweak to change this but I have some clues.
Clue A: The problem is unique to a.add_state. b.add_state in the same syntax will apply a state consecutively. Whether the skill damages or heals.
Clue B: You can apply a state consecutively using a.add_state or b.add_state if the scope of the skill is the user or allies. Damaging or healing.
Clue C: a.add_state works again the turn after it failed to apply the state.
Clue D: The number of turns doesn't matter. The turn after it expires it fails to apply the state.
Clue E: If you don't go first during the turn the state IS applied.
I'm not going to be using outside scripts for this. I'm only modifying the default rpgmaker scripts.
Edit: Video http://youtu.be/HO8NzYLyO8M
Last edited by a moderator:

