Save-Point
Super Simple Map Transition Scriptette - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Super Simple Map Transition Scriptette (/thread-4870.html)



Super Simple Map Transition Scriptette - DerVVulfman - 10-02-2013

Super Simple Map Transition Scriptette
Version 1.0

Seriously? This few sets of lines was all that was missing to allow you to have something more than a fade-to effect when you go from one map to another? With this, you can use any of the 'transitions' in your Graphics\Transitions folder for map transitions as well as your battle transitions!

I do not qualify this as an actual script, but a scriptette. It is a small snippet that can be directly edited/inserted into your default script without hampering any other feature. The only thing that could be affected is if this edit is overwritten by another script that does not include this alteration.

All you need to do is perform some coder's surgery on Scene_Map. First, go to line 276 where you encounter this line:
Code:
    Graphics.transition(20)

That line performs your transition effect that lasts 20 frames, or 1/2 a second. HOWEVER, there is no graphic transition effect tied to it. It is a simple fade-to effect..... Let's change that!!!

Replace that one line with this bit of code:
Code:
    if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
        $game_temp.transition_name = ""
      end

This revision looks at the 'transition_name' value in your Game_Temp class. If this value is empty, it performs the traditional fade-to transition that lasts 20 frames. However, if the transition_name value does contain a filename, it performs a transition with the image stored within the Graphics/Transitions folder. And once completed, it erases the value stored making the system restored to a default setting.

To use, simply make a Script Call to assign a transition to the '$game_temp.transition_name' value before you run a 'Transfer Player' command:
Code:
@>Script Call: $game_temp.transition_name="017-Blind01"
@>Transfer Player[013: Mountain Pass] (053,102), Down

That's actually it!

Couldn't they just add a transition dropdown in the transfer player widget?