Disable Dash

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Disable Dash

Introduction

This script allows developers to disable VX Ace's built-in dash completely without having to spend much time unchecking a checkbox in Map Properties.

Features

  • Disables dash completely.
  • Creators can set which maps don't disable dashing.

Script

Disable Dash (RMVXA)

Author's Notes

I'm well aware of the "Map Properties" option, but what if one wanted to disable dash completely?
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
449
Reaction score
231
First Language
English
Primarily Uses
RMMZ
any chance of changing the disabiling switch so that it can be turned on & off within the game itself?
 

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
Here you go.

 
Code:
=begin  Disable Dash v1.0.1 by PK8 Created: 5/26/2012 Modified: 6/1/2012 ────────────────────────────────────────────────────────────────────────────── ■ Author's Notes   I'm well aware of the "Map Properties" option, but what if one wanted to   disable dash completely? ────────────────────────────────────────────────────────────────────────────── ■ Introduction   This script allows developers to disable VX's built-in dash completely   without having to spend much time unchecking a checkbox in Map Properties. ────────────────────────────────────────────────────────────────────────────── ■ Features   o Disables dash completely.   o Creators can set which maps don't disable dash. ────────────────────────────────────────────────────────────────────────────── ■ Changelog   o v1     (05/26/2012): Initial Release   o v1.0.1 (06/01/2012): Corrected a mistake I made in the alias listings. ────────────────────────────────────────────────────────────────────────────── ■ Methods Aliased   Game_Player.dash?=end#==============================================================================# ** Configuration#==============================================================================module PK8  class Disable_Dash    #--------------------------------------------------------------------------    # * General Settings    #--------------------------------------------------------------------------    # ID of the switch that controls the system.    SWITCH_ID  = 10    # Set which maps will not make this script disable the dash.    # Integers and Ranges can be set.    Map_IDs = [980..999]        #--------------------------------------------------------------------------    # * Do Not Modify    #--------------------------------------------------------------------------    if Map_IDs.include?(nil)      load_data("Data/Mapinfos.rvdata2").keys.each { |item| Map_IDs.push(item) }      Map_IDs.delete(nil)    end    Map_IDs.each { |item|      if item.is_a?(Range)        for i in item; Map_IDs.push(i); end        Map_IDs.delete(item)      elsif item.is_a?(Array)        item.each { | i |          if i.is_a?(Integer); Map_IDs.push[i]          elsif i.is_a?(Range); for i2 in i; Map_IDs.push[i2]; end          end        }        Map_IDs.delete(item)      end    }    Map_IDs.compact  endend#==============================================================================# ** Game_Player#------------------------------------------------------------------------------#  This class handles the player. It includes event starting determinants and# map scrolling functions. The instance of this class is referenced by# $game_player.#==============================================================================class Game_Player < Game_Character  #--------------------------------------------------------------------------  # * Alias Listings  #--------------------------------------------------------------------------  unless method_defined?(:pk8_disabledash_dash?)    alias_method(:pk8_disabledash_dash?, :dash?)  end  #--------------------------------------------------------------------------  # * Determine if Dashing  #--------------------------------------------------------------------------  def dash?    if $game_switches[PK8::Disable_Dash::SWITCH_ID]      return false if !PK8::Disable_Dash::Map_IDs.include?($game_map.map_id)    end    pk8_disabledash_dash?  endend
 
Last edited by a moderator:

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
449
Reaction score
231
First Language
English
Primarily Uses
RMMZ
Here you go.

 =begin Disable Dash v1.0.1 by PK8 Created: 5/26/2012 Modified: 6/1/2012 ────────────────────────────────────────────────────────────────────────────── ■ Author's Notes I'm well aware of the "Map Properties" option, but what if one wanted to disable dash completely? ────────────────────────────────────────────────────────────────────────────── ■ Introduction This script allows developers to disable VX's built-in dash completely without having to spend much time unchecking a checkbox in Map Properties. ────────────────────────────────────────────────────────────────────────────── ■ Features o Disables dash completely. o Creators can set which maps don't disable dash. ────────────────────────────────────────────────────────────────────────────── ■ Changelog o v1 (05/26/2012): Initial Release o v1.0.1 (06/01/2012): Corrected a mistake I made in the alias listings. ────────────────────────────────────────────────────────────────────────────── ■ Methods Aliased Game_Player.dash?=end#==============================================================================# ** Configuration#==============================================================================module PK8 class Disable_Dash #-------------------------------------------------------------------------- # * General Settings #-------------------------------------------------------------------------- # ID of the switch that controls the system. SWITCH_ID = 10 # Set which maps will not make this script disable the dash. # Integers and Ranges can be set. Map_IDs = [980..999] #-------------------------------------------------------------------------- # * Do Not Modify #-------------------------------------------------------------------------- if Map_IDs.include?(nil) load_data("Data/Mapinfos.rvdata2").keys.each { |item| Map_IDs.push(item) } Map_IDs.delete(nil) end Map_IDs.each { |item| if item.is_a?(Range) for i in item; Map_IDs.push(i); end Map_IDs.delete(item) elsif item.is_a?(Array) item.each { | i | if i.is_a?(Integer); Map_IDs.push elsif i.is_a?(Range); for i2 in i; Map_IDs.push[i2]; end end } Map_IDs.delete(item) end } Map_IDs.compact endend#==============================================================================# ** Game_Player#------------------------------------------------------------------------------# This class handles the player. It includes event starting determinants and# map scrolling functions. The instance of this class is referenced by# $game_player.#==============================================================================class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?:)pk8_disabledash_dash?) alias_method:)pk8_disabledash_dash?, :dash?) end #-------------------------------------------------------------------------- # * Determine if Dashing #-------------------------------------------------------------------------- def dash? if $game_switches[PK8::Disable_Dash::SWITCH_ID] return false if !PK8::Disable_Dash::Map_IDs.include?($game_map.map_id) end pk8_disabledash_dash? endend


That was quick! Thanks! Didn't know it was that simple.
 

Latest Threads

Latest Posts

Latest Profile Posts

First steps on an interior castle map
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.
Gamedev for relaxing? yes or no?
I've been having a rough couple of months and as such let down some friends of mine in the RPG Maker community. I still need time to get back to my normal self, but it's nice to be back, to read articles, and to design again (albeit at a slow pace). Hope to give updates on Kid Crescent soon.
Friendly reminder that you don't have to be able to do absolutely everything. It's okay to scale back features or assets if things are too much - especially if you're the only one working on the game! And you can always add things in later. <3

Forum statistics

Threads
107,735
Messages
1,031,740
Members
139,870
Latest member
Berserk94
Top