VX 스크립트

Parallax Horizon
Version
: 1.0
Author: modern algebra
Date: August 2, 2008

Description
This script allows you to set a speed for a parallax to scroll extra when the player is moving. It will scroll in the opposite direction, to give the illusion of a horizon to which the player is moving.

Features
Allows you to set the parallax to have an illusory horizon
Allows you to set the speed map by map
Scrolls only in the opposite direction of the way you are moving, while you are moving.
Is completely compatible with the default scrolling, so that you can even combine the two.
Supports dashing, so the speed you set is doubled when the player is dashing, so the parallax is moving at the correct speed always.

Screenshots
Should look exactly the same as your Scene_Item, provided that you have not made any drastic custom changes

Instructions
See inside the script for instructions
여기서부터 드레그
#==============================================================================
#  Parallax Horizon
#  Version 1.0
#  Author: modern algebra (rmrk.net)
#  Date: August 2, 2008
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#    This script allows you to set a speed for a parallax to scroll extra
#  when the player is moving. It will scroll in the opposite direction, to
#  give the illusion of a horizon.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#    To make it so that the parallax will scroll, you must check the box in the
#  map settings for it to scroll, even if you do not want it to scroll
#  regularly. You can avoid it scrolling regularly by leaving the scroll value
#  at 0. For instructions on setting up the maps, see the CONFIGURABLE REGION
#  at line 49. You can also use this code:
#
#    $game_map.p_scroll_mod =
#
#    to set the speed manually in game. It will reset once you leave the map.
#==============================================================================
# ** Game_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    new public instance variable - p_scroll_mod
#    aliased method - update_parallax
#==============================================================================

class Game_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :p_scroll_mod
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Parallax
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_arclg_req_parallax_moving_response_53b6 update_parallax
  def update_parallax
    # IF player is moving and parallax stats not updated yet
    if $game_player.moving? && @old_parallax_sx == nil
      # Set variables to save the default values of parallax stats
      @old_parallax_sx = @parallax_sx
      @old_parallax_sy = @parallax_sy
      # Initialize scroll modifier
      if @p_scroll_mod == nil
        @p_scroll_mod = case map_id
        #\\\\\\\\\\\\\\\\
        #  CONFIGURABLE REGION
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        #  To configure this script, set up the lines below like this:
        #  
        #    when map_id then scroll_speed
        #
        #  So if you set:
        #    when 1 then 10
        #
        #  That means that the parallax on Map with ID 1 will scroll at
        #  speed 10 in the opposite direction when the player is moving.
        #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
        when 1 then 10
        #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
        #  END CONFIGURABLE REGION
        #//////////////////////////////////////////////////////////////////
        else
          0
        end
      end
      # Modify the scrolling
      if @p_scroll_mod != 0
        # Adjust for dashing
        mod = $game_player.dash? ? @p_scroll_mod*2 : @p_scroll_mod
        # Adjust scroll in the direction the player is moving
        @parallax_sx -= mod if $game_player.x * 256 < $game_player.real_x
        @parallax_sx += mod if $game_player.x * 256 > $game_player.real_x
        @parallax_sy -= mod if $game_player.y * 256 < $game_player.real_y
        @parallax_sy += mod if $game_player.y * 256 > $game_player.real_y
      end
    # Restore Parallax Scroll to default if not moving
    elsif @old_parallax_sx != nil
      @parallax_sx = @old_parallax_sx
      @parallax_sy = @old_parallax_sy
      @old_parallax_sx = nil
      @old_parallax_sy = nil
    end
    # Run Original Method
    modalg_arclg_req_parallax_moving_response_53b6
  end
end

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
177 MAX Level Limitation System 3 Man... 2008.10.28 1198
176 Menu Background Effects(온라인 스크립트 올릴려고 했다가 못 올렸음)아깝다.. Man... 2008.10.28 1665
175 레오 저장 스크립트 9 Man... 2008.10.28 2529
174 Skill Delay VX 4 Man... 2008.10.28 1503
173 아이템 ~[Hide Item]~ Man... 2008.10.27 1597
172 (?스크립트) 스크립트 읽어서 그래픽 넣으세요.(영어 잘하는 사람만 권장...) 2 Man... 2008.10.27 1444
171 Sprite Mover 2 Man... 2008.10.27 1529
170 변수/스위치 MapSwitch VX Version: 1.1 1 Man... 2008.10.27 1327
169 컴퓨스트 플레이어 워크(?) 2 Man... 2008.10.27 1304
168 Jens009's Critical Flash 1.0 3 Man... 2008.10.27 1240
167 LevelMe v1.2 3 Man... 2008.10.27 1154
166 Scene_Credit script Plug & Play 1 Man... 2008.10.27 1085
165 다운로드 링크로 가세요.(스크린 샷 올려놨음) 5 Man... 2008.10.27 1618
164 Screen Shortcut Script Man... 2008.10.27 1142
163 AutoLight v3.7(?) 6 Man... 2008.10.27 1646
» ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
161 ??? 2 Man... 2008.10.27 1329
160 ??? 1 Man... 2008.10.27 1020
159 ??무슨 스크립트?? 3 Man... 2008.10.27 1323
158 영어 잘하는 사람만 보세요..저도 모르겠음(무슨 스크립트인지) 3 Man... 2008.10.27 1372
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32