- Joined
- Jan 5, 2016
- Messages
- 149
- Reaction score
- 88
- First Language
- English
- Primarily Uses
- RMVXA
To preface, no, it is not a compatibility issue.
I'm sorely confused. Also exhausted trying to dive into this relatively small script and figure out why it isn't working. The script in reference can be found here: https://forums.rpgmakerweb.com/index.php?threads/state-add-remove-commands.18593/
It's a pretty straightforward script - it simply runs a single excerpt of code when a state is added or removed. I'm using it to remove a state (let's call it "y") when "x" state is added. This is so far ahead of where I am now, however. Right now, I can't get this script to execute a single line of code. Theoretically, you could put something as simple as this in a state's notetag:
...to print that text to the console when the state is added. But it won't even do that, in a completely new project no less (even though none of my other scripts should interfere with this...). I went as far as to put random code like "onadd: method_which_does_not_exist" and it won't return an error. So clearly the script is never being run in the first place; a considerable problem.
I sifted through Shaz's script a bit, and can't see any obvious issues with it. All it does is alias the method for adding and erasing states in an instance of Game_Battler. My only theory is that Shaz mixed up "remove_state" and "erase_state" but to be honest, I don't even understand the difference between these two methods, they seem to be used the same way. Maybe as an aside, somebody can explain that to me.
Anyways, some help here would be lovely. I'm at my wits' end and this script (or rather its functions) is pivotal to the mechanics of my game. If anyone knows of an alternate way to remove a state when another is added (no, [State Resist] doesn't do this correctly), that would also be awesome. I don't know atm of any other scripts which can do this.
Thank you!
I'm sorely confused. Also exhausted trying to dive into this relatively small script and figure out why it isn't working. The script in reference can be found here: https://forums.rpgmakerweb.com/index.php?threads/state-add-remove-commands.18593/
It's a pretty straightforward script - it simply runs a single excerpt of code when a state is added or removed. I'm using it to remove a state (let's call it "y") when "x" state is added. This is so far ahead of where I am now, however. Right now, I can't get this script to execute a single line of code. Theoretically, you could put something as simple as this in a state's notetag:
Code:
onadd: p 'this works?'
I sifted through Shaz's script a bit, and can't see any obvious issues with it. All it does is alias the method for adding and erasing states in an instance of Game_Battler. My only theory is that Shaz mixed up "remove_state" and "erase_state" but to be honest, I don't even understand the difference between these two methods, they seem to be used the same way. Maybe as an aside, somebody can explain that to me.
Anyways, some help here would be lovely. I'm at my wits' end and this script (or rather its functions) is pivotal to the mechanics of my game. If anyone knows of an alternate way to remove a state when another is added (no, [State Resist] doesn't do this correctly), that would also be awesome. I don't know atm of any other scripts which can do this.
Thank you!

