Ace 스크립트

=begin
#===============================================================================
 Title: Restricted Move Input
 Author: Tsukihime
 Date: Aug 31, 2013
--------------------------------------------------------------------------------
 ** Change log
 Aug 31, 2013
   - Initial release
--------------------------------------------------------------------------------   
 ** Terms of Use
 * Free to use in commercial/non-commercial projects
 * No real support. The script is provided as-is
 * Will do bug fixes, but no compatibility patches
 * Features may be requested but no guarantees, especially if it is non-trivial
 * Credits to Tsukihime in your project
 * Preserve this header
--------------------------------------------------------------------------------
 ** Description
 
 This script allows you to enable or disable movement for specific
 directions using script calls. When a direction is disabled, the player
 is unable to move in that direction on the map using the direction input keys.
 
--------------------------------------------------------------------------------
 ** Installation
 
 Place this script below Materials and above Main

--------------------------------------------------------------------------------
 ** Usage 

 The following script calls will enable or disable specific directions:
 
   disable_move_direction(dir_symbol)
   enable_move_direction(dir_symbol)
   
 Where the `dir_symbol`is one of the following
 
   :UP
   :LEFT
   :RIGHT
   :DOWN
   
--------------------------------------------------------------------------------
 ** Example
 
 To prevent players from moving up or down, use the script calls
 
   disable_move_direction(:UP)
   disable_move_direction(:DOWN)
   
 To enable them again, use the script calls
 
   enable_move_direction(:UP)
   enable_move_direction(:DOWN)
  
#===============================================================================
=end
$imported = {} if $imported.nil?
$imported["TH_RestrictedMoveInput"] = true
#===============================================================================
# ** Configuration
#===============================================================================
module TH
  module Restricted_Move_Input
    
    Input_Map = {
      :DOWN => 2,
      :LEFT => 4,
      :RIGHT => 6,
      :UP => 8
    }
  end
end
#===============================================================================
# ** Rest of Script
#===============================================================================
class Game_System
  
  def disabled_move_inputs
    @move_input_disabled ||= {}
  end
end

class Game_Interpreter
  
  def disable_move_direction(dir_symbol)
    dir = TH::Restricted_Move_Input::Input_Map[dir_symbol]
    $game_system.disabled_move_inputs[dir] = true
  end
  
  def enable_move_direction(dir_symbol)
    dir = TH::Restricted_Move_Input::Input_Map[dir_symbol]
    $game_system.disabled_move_inputs[dir] = false
  end
end

class Game_Player < Game_Character
  
  alias :th_linear_movement_move_by_input :move_by_input
  def move_by_input
    return if $game_system.disabled_move_inputs[Input.dir4]
    th_linear_movement_move_by_input
  end
end

사용법은.. 그냥 텍스트파일로.

Who's 스리아씨

?
뺘라뺘뺘
Atachment
첨부 '2'
  • ?
    아라비카100 2013.09.27 07:49
  • ?
    스리아씨 2013.09.27 07:51
    ㅇ?
  • ?
    아라비카100 2013.09.27 18:21
    손팅
  • ?
    꺼믄고양이 2014.01.07 15:41
    이 스크립트를 사용해도 달라진게 없어요..ㅠ 제가 원하는건 캐릭터칩의 좌우이동만 허락하는 건데..
  • profile
    구륨 2014.02.04 10:20
    스크립트를 등록하기만 해서는 작동되지 않습니다.
    설명에 나와 있듯이, 이벤트 페이지 3에 있는 스크립트 항목을 통해 통행 금지 방향을 지정해주어야 됩니다.
    간편하게, example에 있는 네 항목을 복붙하여 사용하면 됩니다.

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28925
137 전투 XAS VX ACE 데모 한글 번역 ( 스크립트 번역 모음 ) 1 미루 2013.01.10 4556
136 전투 XAS Hero Edition Ace Experimental 0.5 6 Alkaid 2012.01.15 6130
135 전투 WhiteFlute: 자동전투 스크립트 3 file Alkaid 2012.09.20 3774
134 맵/타일 WhiteFlute - XPMap-EX (VX Ace에서 XP의 맵 데이터를 읽을 수 있게 함) 3 Alkaid 2012.12.26 1502
133 스킬 VXACE 패시브 스킬 스크립트 Ver. 0.82 21 file 아이미르 2012.03.07 6669
132 장비 VXAce 장비장착 스킬발동 스크립트 2 아이미르 2012.09.02 2400
131 스킬 VXAce 아츠장착 스킬습득 스크립트 1 file 아이미르 2013.02.24 2777
130 아이템 VXAce 아이템 합성 스크립트 Ver 0.8 17 아이미르 2012.08.23 4000
129 아이템 VXAce 아이템 채집 스크립트 23 file 아이미르 2012.11.23 4050
128 아이템 VXAce 아이템 도감 스크립트 7 file 아이미르 2012.12.31 3800
127 스킬 VXAce 스킬포인트 스크립트 5 file 아이미르 2013.03.21 4150
126 스킬 VXAce 스킬레벨, 스킬장착 스크립트 11 file 아이미르 2012.11.01 3812
125 아이템 VXAce 셋트장비 스크립트 9 file 아이미르 2013.03.08 3642
124 상점 VXAce 상점 스크립트 V0.9 17 아이미르 2012.06.29 5380
123 전투 VXAce 사이드뷰 스크립트 (번역) 23 아이미르 2012.12.10 6356
122 스킬 VXAce 경험치 스킬습득 스크립트 3 file 아이미르 2012.10.27 2726
121 버그픽스 VXAce SP1 2 Alkaid 2013.02.15 2047
120 상점 VXAce SkillShop 스크립트 3 file 아이미르 2012.10.30 2895
119 아이템 VXAce No Recipe 아이템합성 스크립트(버그 수정) 11 file 아이미르 2013.01.07 3308
118 제작도구 VXAce HUD Designer by Cidiomar R. Dias Jr 1 file 습작 2013.01.19 6761
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11