It works perfectly! You guys are amazing
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#==============================================================================
# ** Classic Zelda Screen Transitions
#------------------------------------------------------------------------------
# * Created by: albertfish
# * Version: 1.0
# * Last edited: September 7, 2010
#------------------------------------------------------------------------------
# Version History:
# Version 1.0: September 7, 2010
# - Initial release
#------------------------------------------------------------------------------
# Description:
# This script mimics the screen transitions found in the 2D Zelda Games.
#------------------------------------------------------------------------------
# Features:
# - Separeated a large map in to small screen size parts and adds a smooth
# transition between the parts.
#------------------------------------------------------------------------------
# Install Instructions:
# Place this script above the main script and below the default scripts.
#==============================================================================
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
# This class brings together map screen sprites, tilemaps, etc.
# It's used within the Scene_Map class.
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias af_czst_ssm_init initialize
def initialize
@x = ($game_player.x - $game_player.x % 20) * 128
@y = ($game_player.y - $game_player.y % 15) * 128
@amount_x = 0
@amount_y = 0
@scrolling = false
@prev_x = $game_player.x
@prev_y = $game_player.y
$game_map.display_x = @x
$game_map.display_y = @y
af_czst_ssm_init
end
#--------------------------------------------------------------------------
# * Scroll Right
#--------------------------------------------------------------------------
def scroll_right
@x += 128
@amount_x -= 1
if @amount_x <= 0
@scrolling = false
end
end
#--------------------------------------------------------------------------
# * Scroll Left
#--------------------------------------------------------------------------
def scroll_left
@x -= 128
@amount_x += 1
if @amount_x >= 0
@scrolling = false
end
end
#--------------------------------------------------------------------------
# * Scroll Up
#--------------------------------------------------------------------------
def scroll_up
@y -= 96
@amount_y -= 1
if @amount_y <= 0
@scrolling = false
end
end
#--------------------------------------------------------------------------
# * Scroll Down
#--------------------------------------------------------------------------
def scroll_down
@y += 96
@amount_y += 1
if @amount_y >= 0
@scrolling = false
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias af_czst_ssm_update update
def update
if !@scrolling
# Determine if the screen needs to scroll left or right
if $game_player.x % 20 == 0 && ($game_player.x - 19) * 128 > $game_map.display_x
@amount_x = 20
@scrolling = true
@prev_x += 1
elsif $game_player.x % 20 == 19 && ($game_player.x) * 128 < $game_map.display_x
@amount_x = -20
@scrolling = true
@prev_x -= 1
end
# Determine if the screen needs to scroll up or down
if $game_player.y % 15 == 0 && ($game_player.y - 14) * 128 > $game_map.display_y
@amount_y = -20
@scrolling = true
@prev_y += 1
elsif $game_player.y % 15 == 14 && ($game_player.y) * 128 < $game_map.display_y
@amount_y = 20
@scrolling = true
@prev_y -= 1
end
else @scrolling
# Scroll either left or right
if @amount_x > 0
scroll_right
elsif @amount_x < 0
scroll_left
end
# Scroll either up or down
if @amount_y < 0
scroll_down
elsif @amount_y > 0
scroll_up
end
$game_player.x = @prev_x
$game_player.y = @prev_y
end
$game_map.display_x = @x
$game_map.display_y = @y
@prev_x = $game_player.x
@prev_y = $game_player.y
af_czst_ssm_update
end
end
class Game_Character
def x=(x)
@x = x
end
def y=(y)
@y = y
end
end
Quote from: ForeverZer0 on July 24, 2010, 10:32:02 pm
I'll write you a quick script for this sometime here, it won't be that complicated. Maybe just use a module for script calls that you can pass the arguments onto that will be the choices, and just use Window_Command to create a window real quick.
Quote from: game_guy on October 07, 2009, 02:53:26 pm
use my quest log if you need one
http://forum.chaos-project.com/index.php?topic=3689.0