RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Disable Dash States

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Disable Dash States
Version: 1.0
Author: modern algebra
Date: September 6, 2009

Version History


  • <Version 1.0> 09.06.2009 - Original Release

Description


This script allows you to set states that, if possessed by any actor in the party, will disable dashing until the state is removed.

Features

  • Easy configuration
  • Allows you to create conditions that affect dashing, such as a Leg Sprain

Instructions

Place above Main and below other custom scripts in the Script Editor (F11). To set a state to disable dashing, put this code in the notebox of the state:

      \Disable_Dash

Script


Code: [Select]
#==============================================================================
#    Disable Dash States
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: September 6, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place above Main and below other custom scripts in the Script Editor (F11)
#
#    To set a state to disable dashing, put this code in the notebox of the
#   state:
#
#      \Disable_Dash
#
#    Dashing will be disabled if ANY party member possesses this state.
#==============================================================================

#==============================================================================
# ** RPG::State
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - disable_dash?
#==============================================================================

class RPG::State
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check if dash disabled
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def disable_dash?
    return self.note[/\\DISABLE_DASH/i] != nil
  end
end

#==============================================================================
# ** Game Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - disable_dash?
#==============================================================================

class Game_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check if dash enabled
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_dash_states_disble_8kb3 disable_dash?
  def disable_dash? (*args)
    # Check if a state is possessed that disables dashing
    for actor in $game_party.members
      actor.states.each { |state| return true if state.disable_dash? }
    end
    # Run Original Method
    return ma_dash_states_disble_8kb3 (*args)
  end
end

Credit


  • modern algebra

Thanks

  • TheDrifter, for the request

Support


Please post in this topic at RMRK for support or suggestions.

Known Compatibility Issues

No known compatibility issues

Author's Notes


September is unchallenging and semi-useless script month!


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:47:21 PM by Modern Algebra »

****
Rep:
Level 83
"September is unchallenging and semi-useless script month!"

Really?? I might make one or two then...lol.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
haha, I think your Level Up Effects script seems quite useful, personally.

****
Rep:
Level 83
Thanks.
All of your scripts are useful so... Although I don't see this script getting used that often. lol

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I'm curious, is there a way to change the walk speed as well? For instance, I do actually have a state (Sprain), which disables the dash, but I'd like them to walk even slower than the normal walk speed while the state is applied (probably 3 or 2, instead of the standard 4). How easy or hard is it to add that into this? haha