Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: jayje on October 27, 2017, 07:33:58 pm

Title: [RESOLVED]Changing Battle Transitions[XP]
Post by: jayje on October 27, 2017, 07:33:58 pm
I'm trying to change THE based on the enemy you fight. one Transition for regular foes and another for boss fights. Any ideas welcome!
Title: Re: Changing Battle Transitions[XP]
Post by: KK20 on October 27, 2017, 08:29:54 pm
I don't understand why this is in script troubleshooting. There's an event command that changes the battle transition. You do Prepare for Transition, Battle Processing, and then Execute Transition (I think). You do this for your boss battles.

Meanwhile, enemy battle transitions are a setup option in the System tab.
Title: Re: Changing Battle Transitions[XP]
Post by: jayje on October 27, 2017, 08:34:28 pm
I tried that, but all I got was a blank transition that only works if you're teleporting from one place to another, not for battle. Unless I missed something.
Title: Re: Changing Battle Transitions[XP]
Post by: KK20 on October 27, 2017, 08:48:40 pm
Turns out that you do have to use a script. God dammit Enterbrain.

Thanks Zexion for graphic
(https://media.discordapp.net/attachments/177202881177452544/373633420871467020/unknown.png)
This permanently changes the battle transition graphic in the System tab. So after the battle, make sure to do another script call to reset back to the original graphic.
Title: Re: Changing Battle Transitions[XP]
Post by: jayje on October 27, 2017, 09:09:21 pm
Ok. I had it backwards. I tried to use the line of code for Scene_Battle 1, but nothing happened. Thanks 8)
Title: Re: Changing Battle Transitions[XP]
Post by: Heretic86 on October 31, 2017, 05:00:41 pm
Script was correct.  You got screwed over by another Enterbrain bug in XP, the "Interpreter 355 Bug".

In Interpreter 7, def command_355, find this part of the code:


...
    # Evaluation
    result = eval(script)
    # If return value is false
    if result == false
      # End
      return false
    end
    # Continue
    return true
...


You need to get rid of "return false".  Either delete it or put a # character in front of it to prevent it from running.

What happens is when you run a script with several lines, if the first line of the script doesnt produce "true" as it "evaluates", then the whole game just hangs there.  For example: "Script: foo = (@something == 1) ? true : false".  If foo is ever false, then the game will hang.

And yes, this needs to be changed in EVERY PROJECT you ever create.
Title: Re: Changing Battle Transitions[XP]
Post by: jayje on October 31, 2017, 07:31:50 pm
Thanks for the tip. I'll do that