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
637 ((대박!)) 게임상의 모든 글자에 효과 주기.. 33 미카엘 2008.08.20 5581
636 (?스크립트) 스크립트 읽어서 그래픽 넣으세요.(영어 잘하는 사람만 권장...) 2 Man... 2008.10.27 1444
635 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
634 상점 (수정)크리쳐 샵, 'SW_CreatureShop' by Siot Warrior 15 file 시옷전사 2010.09.03 3675
633 액터 (수정)크리쳐 합체, 'SW_CreatureMix' by SiotWarrior 22 file 시옷전사 2010.09.07 2972
632 기타 (이거 정말 좋군요) 말이나 용을 탈수있게 하는 스크립트. 31 file 아방스가 짱 2010.02.28 4261
631 기타 (좀 이상한 or 쓸모없을 듯 한)화면상에 몬스터와 만나려면 몇걸음 남았는지 표시하는 스크립트! 2 루시페르 2009.06.06 2318
630 기타 078656577er님의 스크립트를 개조한, 사격용 스크립트 1 file 타코 2012.03.16 2519
629 기타 2 Players Engine 11 레이니케 2008.03.28 2294
628 2 Players Engine 2인용하기 15 file RPGbooster 2008.10.08 3999
627 전투 2003식 사이드뷰 적들도 가까이와서 공격함 ㅇㅇ 51 배군 2008.05.02 6750
626 이동 및 탈것 2D 횡스크롤 스크립트 56 file 사람이라면? 2010.08.15 7570
625 이동 및 탈것 3D 던젼 스크립트 38 아방스 2010.12.06 5772
624 그래픽 3D그래픽 파티클엔진 45 file RPGbooster 2008.10.08 10130
623 파티 5인 파티 프로젝트 V1.1 4 file 지나가는떡꼬치 2012.06.30 2988
622 이동 및 탈것 8 방향 이동스크립트 + 스프라이트 효과 12 file 레오 2009.02.06 7557
621 기타 <중수이상>RPG VX의 대표적 참조값 6 까까까 2009.05.31 3236
620 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
» ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
618 ??? 1 Man... 2008.10.27 1020
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32