Hello,
I am currently lost in one place in my project. I have made a skill that apart from dealing large amount of damage changes the battleback to relfect the destruction that followed the use of the skill. However, changing the battleback during the battle (I have a script fix to be able to do so, it's by Kal if I recall correctly) changed it for all the battles on this map, and I want it to revert to normal after the battle. I know I could just change it again the same way, but the point is I need this process done many times, not once, so I need the battleback to change back to what it was instead of changing to a specific battleback (let's say it'd be a forest), because that would lead to all maps' battlebacks changing to this one specific battleback... and in a map with lava I would have the battleback of a forest... So I need an option to revert the battleback to the previous one. Is this possible?
Sorry for making this so long, I wanted to be clear what I mean 🙂
Thanks in advance.
are you using random battles or evented battles?
In the case of evented battles this would be easy to solve by adding the correct change program after the battle processing command of the event.
If you are using random battles, you'll need one parallel process per map, triggered by a switch activated from the skill, that changes the setting for the map and switches itself off again.
I am using random battles. But if I change the battleback, it remains changed for all the other battles, so if the switch is simply turned off, it will not revert back to the previous one. And even if it did, when the switch is turned off then it would immediately change back during the fight, so I think need it to switch off after the battle if it would change the battleback back.
You didn't understand - that's why I said you'll need a parallel process map event on each map.
1) make a switch "battleback changed".
2) on each map, make a parallel process event at a place the player never moves on, no sprite, conditioned to exactly that switch.
3) give that parallel process exactly two commands: one command to change the battleback back to the regular battleback used on that map, and one command to switch off the switch.
4) in your skill, switch on that switch when you change the battleback.
Parallel processes are automatically stopped while you're on the battlescreen, so that map parallel can only change it back after the battle has ended.
Thank you very much, it works! I didn't know that parallel processes stop during battle, that makes sense now 🙂
On a side note, I have another problem, but I don't think you can help me in that one. This skill that changes the battleback only works like this if a specific skill was used before in this battle. So I had the first skill to turn on the switch, and then the other skill triggers the battleback change and other effects when the switch is on (and then it switches it off). The problem is, I have Yanfly's script for enemy HP bars and the bars disappear when I attack the enemy with this first skill. It looks like it doesn't work when this switch is off, because when the second skill turns off the switch, the bars are present again. They don't appear if after the first skill I use some other skill or just attack, so I think it concerns the switch. You don't happen to have an idea about this, do you?
Again, thank you for your help and very swift replies.
A lot of scripts use switches for their configuration, and you need to make sure that those switches are not used for anything else.
It sounds as if the switch you're using for the skill is the same switch the script uses to turn on or off the display of the bars.
I suggest you check the script configuration, change any switch assignments in it to different (currently unused) switches and then name those switches to prevent another accidental double assignment. Follow the link "how to use a script" in my signature for more details.
I couldn't find the line in which I can change the switch assignment, but I just turned off the requirement for the switch to be on, because I don't need the bars to appear only when a certain switch is on. Thank you one more time 🙂 The link is very useful too.
This thread can now be closed 🙂