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.
[RESOLVED] Requesting Run Script

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Keep on Baggin'
I think this is a simple enough request.. could someone script it so that when the player holds down the space bar, the heroes movement speed increases by 1 and his charset changes (when realesed he goes back to normal)? (could probably do it with common events too, i dunno)  Would it be possible to make it so that when a switch is on, let's say DONTRUN, the running no longer works? (for like ladders and stairs and stuff)  THANKS!
« Last Edit: January 21, 2007, 08:56:28 PM by Blizzard »
Some friends mend.  Some friends depend.  Some friends lend.  Some friends send.  Friend.

***
Rep:
Level 89
I am yourself!
Guess no script is needed...

All you have to do is make a common event and make it parallel process, and make an Input Key (or something like that) command. Choose a variable, then make a conditional branch if the variable is = ..., then change character's speed by using Move Event command.
Symphony of Alderra : Memoirs of Life

Storyline : 200% (Overimaginatives)
Scripting : 100% (At last...)
Eventing  : 100%
Mapping   : 0.125%

**
Rep:
Level 88
Shut up and leave me alone!
I also have a question relating the dash button. I already have a script that allows me to run when I press and hold the shift key. Well I want to also have a small bar in the bottom right hand corner that's called your "Dash Bar" and when you use the dsah button it slowly decreases until you have no run power left.
Hi...

***
Rep:
Level 88
Keep on Baggin'
Waffle, could u share that script?
Some friends mend.  Some friends depend.  Some friends lend.  Some friends send.  Friend.

**
Rep:
Level 88
Shut up and leave me alone!
I have the run script and I'll post that but I don't have the bar that tells you how much run you have left. If you don't mind not having that.
Hi...

**
Rep:
Level 88
Shut up and leave me alone!
Ok I got it. Here is the simple Dash Button Script. I can not take credit for it because I can't script at all. But I actually don't know who created it. It might even be someone on these forums, who knows?

This script will allow you to have your player move at a faster rate by pressing and holding the "Shift Key"

Just insert this script above main in your script editor:

Code: [Select]
#==============================================================================
# ++ グラフィック変更ダッシュ ver. 1.21 ++
#  Script by パラ犬
#  http://para.j-mx.com/
#------------------------------------------------------------------------------
# 「Graphics/Characters」フォルダに
# ã€Œï¼ˆå…ˆé ­ã‚­ãƒ£ãƒ©ã®æ­©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯åï¼‰ï¼‹_dashã€ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆ
# ダッシュ時のグラフィックとして使用します。(例:001-Fighter01_dash)
#==============================================================================

class Game_Player < Game_Character

  SPEED_DASH = 5 # ダッシュ時の移動速度
  SPEED_NORMAL = 4 # 通常の移動速度

  # ダッシュに使うボタン(表記方法は、Input::(ボタン))
  #(キーボードとの対応表はツクールのヘルプにあります)
  KEY_DASH = Input::A

  # "_dash"ã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ãŒå­˜åœ¨ã—ãªã„å ´åˆãƒ€ãƒƒã‚·ãƒ¥ã‚’ã™ã‚‹ã‹ï¼ˆ true:する / false:しない )
  NO_FILE_DASH = true
 
  # 静止時はグラフィックを変更しない( true:変更しない / false:変更する )
  CHANGE_IN_MOVING = false
 
  # ダッシュ禁止イベントスイッチID
  # (イベントコマンド「スイッチの操作」でこの番号のスイッチをONにしている間は
  #  ダッシュを機能を無効にします)
  NO_DASH_SWITCH = 999

end

#==============================================================================
# â–  Game_Player
#==============================================================================

class Game_Player < Game_Character

  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias dash_update update
  def update
    # イベント実行中、移動ルート強制中、
    # ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦è¡¨ç¤ºä¸­ã®ã„ãšã‚Œã§ã‚‚ãªã„å ´åˆ
    unless $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      if !($game_switches[NO_DASH_SWITCH])
        # キー判定
        if Input.press?(KEY_DASH) and (CHANGE_IN_MOVING == false or Input.dir8 != 0)
          if (dash_graphic_exist?($game_party.actors[0]) or NO_FILE_DASH)
            # ダッシュ中でなければダッシュ
            if @move_speed != SPEED_DASH
              @move_speed = SPEED_DASH
              @dash_on = true
              $game_player.refresh
            end
          end
        elsif @dash_on == nil or @dash_on
            @move_speed = SPEED_NORMAL
            @dash_on = nil
            $game_player.refresh
        end
      end
    end
    dash_update
  end
  #--------------------------------------------------------------------------
  # â—‹ ダッシュグラフィックの有無をチェック
  #--------------------------------------------------------------------------
  def dash_graphic_exist?(actor)   
    # 読み込みテスト
    begin
      RPG::Cache.character(actor.character_name.to_s + "_dash", actor.character_hue)
    rescue
      return false
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  alias dash_refresh refresh
  def refresh
    dash_refresh
    # パーティ人数が 0 äººã§ãªã„å ´åˆ
    if $game_party.actors.size != 0
      actor = $game_party.actors[0]
      # キャラクターのファイル名と色相を設定
      if @dash_on and dash_graphic_exist?(actor)
        fileplus = "_dash"
      else
        fileplus = ""
      end
      @character_name = actor.character_name + fileplus
      @character_hue = actor.character_hue
    end
  end
end
« Last Edit: January 21, 2007, 04:18:48 AM by Wafflekid »
Hi...

**
Rep:
Level 88
I Kill, Therfor I Am.
could an admin mark this as resolved and lock this topic, i keep reading this one thinking this guy still needs this script
Code: [Select]
[code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code] [code]
[/code] OMG WTF?? [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code] [/code]