It's possible that this is in the wrong topic, because it's not per say a script request so much as asking to have one of the core scripts modified.
But before I say, let me note the maker I'm using: RMVXA.
What I would like to do is be able to set the speed at which the screen fades out (and in) when you use the fade out (and in) screen command from the second page.
Anybody know how to?
I think this should work.
Use this in a script call.
$game_map.screen.start_fadeout(duration)
$game_map.screen.start_fadein(duration)
Example:
$game_map.screen.start_fadeout(200)
If you want to change it for every time you use the command you would have to change it here.
#==============================================================================
# ? Game_Interpreter
#------------------------------------------------------------------------------
# ????????????????????????????? Game_Map ????
# Game_Troop ????Game_Event ??????????????
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def command_221
Fiber.yield while $game_message.visible
screen.start_fadeout(30)
wait(30)
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def command_222
Fiber.yield while $game_message.visible
screen.start_fadein(30)
wait(30)
end
end
Change where it says.
screen.start_fadein(30)
wait(30)
The 30 to the new fadein or fadeout default duration.
I know it wasn't necessary, but I whipped up a script anyway. Sorry if this offends you, TDS, your way works perfectly fine, I just thought there would be an easier way for the user (and I was bored).
#===============================================================================
#
# Change Fade Time (1.0)
# 31/01/2012
# By Pacman (for Countdown)
# This script will alter the number of frames it takes to fade the screen in
# and out (with the default commands). This is done with a simple script call.
# You can also set an individual fadein or fadeout to have a different number
# of frames.
# Set INITIAL_FRAMES to the number of frames it takes to fade in and out from
# the beginning of the game at line 22.
# Use these script calls to do the functions described next to them:
# change_fade_time(n) - Change the number of frames it takes to fade in and
# out to n.
# fadein(n) - Fade the screen in with n frames.
# fadeout(n) - Fade the screen out with n frames.
# Keeping in mind that 60 frames = 1 second.
#
#===============================================================================
#
# BEGIN CONFIGURATION
#
module FADE_TIME # Do not touch this.
INITIAL_FRAMES = 30 # Starting number of frames.
end # Do not touch this.
#
# END CONFIGURATION
#
#===============================================================================
#==============================================================================
# ? Game_System
#------------------------------------------------------------------------------
# ??????????????????????????????????????
# ????????????????? $game_system ????????
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :fade_time
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias fade_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
fade_init(*args)
@fade_time = FADE_TIME::INITIAL_FRAMES
end
end
#==============================================================================
# ? Game_Interpreter
#------------------------------------------------------------------------------
# ????????????????????????????? Game_Map ????
# Game_Troop ????Game_Event ??????????????
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# * Fadeout screen
#--------------------------------------------------------------------------
def command_221
Fiber.yield while $game_message.visible
screen.start_fadeout($game_system.fade_time)
wait($game_system.fade_time)
end
#--------------------------------------------------------------------------
# * Fadein screen
#--------------------------------------------------------------------------
def command_222
Fiber.yield while $game_message.visible
screen.start_fadein($game_system.fade_time)
wait($game_system.fade_time)
end
#--------------------------------------------------------------------------
# * Alter fade time for screen
# n : new number of frames fadein and fadeout take.
#--------------------------------------------------------------------------
def change_fade_time(n)
$game_system.fade_time = n
end
#--------------------------------------------------------------------------
# * Fadein with specific number of frames
# n : number of frames to fade in by (defaults to set number)
#--------------------------------------------------------------------------
def fadein(n = nil)
Fiber.yield while $game_message.visible
screen.start_fadein(n.nil? ? $game_system.fade_time : n)
wait(n.nil? ? $game_system.fade_time : n)
end
#--------------------------------------------------------------------------
# * Fadeout with specific number of frames
# n : number of frames to fade in by (defaults to set number)
#--------------------------------------------------------------------------
def fadeout(n = nil)
Fiber.yield while $game_message.visible
screen.start_fadeout(n.nil? ? $game_system.fade_time : n)
wait(n.nil? ? $game_system.fade_time : n)
end
end
$imported ||= {}
$imported[:pac_change_fade_time]
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
With this you can simply use:
change_fade_time(120)
to make the fadein and fadeout 2 seconds long.
You can also just use:
fadein(60)
fadeout(60)
to make them 1 second long. The default command still works.
Wow, you two are both amazing. I was seriously not expecting an answer so quickly. +rep for both of you and credit in the game (which I've only just started).