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 6659
177 기타 능력치에 따른 스테이트변화 / 능력치한계지정 5 Evangelista 2009.05.26 2492
176 제작도구 Window Maker by Jet 12 Alkaid 2010.09.26 2465
175 저장 Neo Save System V by Helladen(Original by Woratana) 8 Alkaid 2010.09.02 2465
174 이동 및 탈것 느리게 걷기 5 허걱 2009.08.23 2456
173 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2449
172 맵/타일 Map Saver 17 file 비극ㆍ 2010.04.18 2445
171 기타 좀 뭐랄까... 어이없는 "비행선 더 높게 날아오르게 하기!"스크립트.... 8 루시페르 2009.06.06 2442
170 스킬 훔치기 스킬을 만드는 스크립트! 5 우켈킁 2011.03.31 2440
169 기타 레벨업 시 증가분의 HP/MP 회복 10 시트르산 2010.09.12 2440
168 아이템 아이템의 공격횟수 추가 8 star211 2010.01.19 2440
167 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2426
166 Enable Usage of Rmxp 캐릭터(?) 5 Man... 2008.10.28 2424
165 아이템 아이템 프라이스 체인저?? Man... 2008.10.28 2424
164 상태/속성 Full Status CMS 1.0d by Modern Algebra 1 file Alkaid 2010.09.03 2423
163 변수/스위치 다른 이벤트 셀프스위치 조작 - xp, vx 사용가능 3 허걱 2009.07.18 2415
162 맵/타일 Tileset Reader VX 2.1 by DerVVulfman 4 Alkaid 2010.09.20 2407
161 전투 대미지 MP전환 스테이트 : 수정 => 마나쉴드 7 Evangelista 2009.08.29 2403
160 전투 맨손 공격시 2번공격하는 스크립트 5 아방스 2008.01.24 2402
159 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2398
158 파티 Party Changer 3.9 by Dargor 5 file Alkaid 2010.09.12 2395
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