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 5592
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 29398
77 키입력 키 입력 확장 - 전체키 + 마우스입력 40 file 허걱 2012.12.15 5810
76 전투 VXAce 사이드뷰 스크립트 (번역) 23 아이미르 2012.12.10 6379
75 영상 EST - SOV Video Player ++ Script Conversion 1.2 by estriole 9 file Alkaid 2012.12.02 2771
74 기타 Icon_Character 8 file 허걱 2012.11.23 2617
73 아이템 VXAce 아이템 채집 스크립트 23 file 아이미르 2012.11.23 4069
72 기타 MOG-MEMORY CLEAR (v1.0) 1 file winspec 2012.11.18 1659
71 기타 MOG-XAS ANTI LAG (V1.0) 1 file winspec 2012.11.18 1696
70 기타 MOG-ANTI ANIMATION LAG (v1.0) 1 file winspec 2012.11.18 1565
69 기타 [스크립트 사용자용] Tag System 1 허걱 2012.11.12 2112
68 맵/타일 맵 이동시 이벤트(NPC) 위치 유지하기 (수정) 4 이브 2012.11.07 2160
67 스킬 VXAce 스킬레벨, 스킬장착 스크립트 11 file 아이미르 2012.11.01 3831
66 상점 VXAce SkillShop 스크립트 3 file 아이미르 2012.10.30 2906
65 기타 VXAce Common Exp 스크립트 6 file 아이미르 2012.10.29 2398
64 아이템 랜덤 아이템샵. 1 탐험가 2012.10.28 2318
63 스킬 VXAce 경험치 스킬습득 스크립트 3 file 아이미르 2012.10.27 2757
62 메시지 한국어 조사처리 스크립트 7 Ilike게임 2012.10.09 3641
61 전투 WhiteFlute: 자동전투 스크립트 3 file Alkaid 2012.09.20 3794
60 기타 ACE) 캐릭터 사전 by 77ER 19 77이알 2012.09.17 3961
59 전투 Drop Options by modern algebra 3 Alkaid 2012.09.17 2873
58 아이템 Tactics Ogre PSP Crafting System by Mr.Bubble 6 Alkaid 2012.09.17 3075
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11