Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Simple Transfers
- # Author: Nicke
- # Created: 12/12/2011
- # Edited: 02/01/2012
- # Version: 1.0a
- #==============================================================================
- # Instructions
- # -----------------------------------------------------------------------------
- # To install this script, open up your script editor and copy/paste this script
- # to an open slot below ▼ Materials but above ▼ Main. Remember to save.
- #
- # This simple script basically just changes the method when a player is transferring.
- # You can set up a random transition to use when they are changing the map.
- #
- # You can also change the transfer fade in/fade out time if the transition
- # is not in use.
- #==============================================================================
- ($imported ||= {})["NICKE-SIMPLE-TRANSFERS"] = true
- module NICKE
- module TRANSFERS
- #--------------------------------------------------------------------------#
- # * Settings
- #--------------------------------------------------------------------------#
- # Change the fade out/fade in speed with variables ingame.
- # (Not enabled if transition image is in use.)
- #
- # Default values in frames: 30, 30, 15.
- # TRANSFERS [ FADE_OUT_VARIABLE, FADE_IN_VARIABLE, WAIT(frames) ]
- TRANSFERS = [39, 40, 10]
- # Use transition? SWITCH_ID to turn it on/off.
- # Change the TRANSITION string to your image file located in PATH.
- # Note: If random is enabled the filename must be 0,1,2 etc and TRANSITION will
- # not be in use since it gets the transition file from rand_transition instead.
- # TRANSITION [ SWITCH_ID, PATH, SPEED, TRANSITION, OPACITY, RANDOM ]
- TRANSITION = [8, "Graphics/Transitions/", 40, "", 50, true]
- # Only if TRANSITION random is enabled.
- # Specify the value of randomized transition images in here.
- # As of right now the value is 4 which means you need to have 4 images
- # inside your transition folder starting from 0 to 4.
- RANDOM_VALUE = 4
- end
- end
- # *** Don't edit below unless you know what you are doing. ***
- #==============================================================================#
- # ** Scene_Map
- #==============================================================================#
- class Scene_Map < Scene_Base
- @@transition_path = NICKE::TRANSFERS::TRANSITION[1]
- # // Method to get a random transition.
- def rand_transition(number)
- transition_rand = rand(number)
- transition = "#{@@transition_path}#{transition_rand}"
- end
- # // Method when the player is transferring. (override)
- def update_transfer_player
- return unless $game_player.transfer?
- transition_disabler = $game_switches[NICKE::TRANSFERS::TRANSITION[0]]
- Graphics.freeze
- fade = (Graphics.brightness > 0)
- fadeout($game_variables[TRANSFERS[0]]) if fade && transition_disabler
- @spriteset.dispose
- $game_player.perform_transfer
- $game_map.autoplay
- $game_map.update
- Graphics.wait(NICKE::TRANSFERS::TRANSFERS[2]) if !transition_disabler
- @spriteset = Spriteset_Map.new
- fadein($game_variables[TRANSFERS[2]]) if fade && transition_disabler
- if !transition_disabler
- if NICKE::TRANSFERS::TRANSITION[5] # // Random enabled or not?
- Graphics.transition(NICKE::TRANSFERS::TRANSITION[2],rand_transition(NICKE::TRANSFERS::RANDOM_VALUE),NICKE::TRANSFERS::TRANSITION[4])
- else
- transition = NICKE::TRANSFERS::TRANSITION[3]
- Graphics.transition(NICKE::TRANSFERS::TRANSITION[2],"#{@@transition_path}#{transition}",NICKE::TRANSFERS::TRANSITION[4])
- end
- else
- Graphics.transition(30)
- end
- Input.update
- end
- end # END OF FILE
- #=*==========================================================================*=#
- # ** END OF FILE
- #=*==========================================================================*=#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement