Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Requesting Run Script

Started by TeaBag, January 19, 2007, 05:48:52 AM

0 Members and 1 Guest are viewing this topic.

TeaBag

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!
Some friends mend.  Some friends depend.  Some friends lend.  Some friends send.  Friend.

Sthrattoff

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%

Wafflekid

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...

TeaBag

Waffle, could u share that script?
Some friends mend.  Some friends depend.  Some friends lend.  Some friends send.  Friend.

Wafflekid

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...

Wafflekid

#5
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:

#==============================================================================
# ++ ã,°ãƒ©ãƒ•ã,£ãƒƒã,¯å¤‰æ›´ãƒ€ãƒƒã,·ãƒ¥ã€€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
Hi...

Largo Usagi

could an admin mark this as resolved and lock this topic, i keep reading this one thinking this guy still needs this script
[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]