Main Menu
  • Welcome to The RPG Maker Resource Kit.

Dash script.

Started by Azark, March 11, 2006, 07:51:02 AM

0 Members and 1 Guest are viewing this topic.

Azark

Dont know if anyone wants this but it will work fine with the Diagonal movement script

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


And you will be needing this too


Just import the pic to Characters and hold shift to run.
Credits dont go to me but some japanese guy.

100% sexy.

VampireHSS

<3 phenom
<3 Hypnotic

ShellShocked

does it matter if its in japaness?

thatsmypie

No! (You spelt Japanese wrong!)

Viper

This should be integrated with stamina, otherwise he could be running forever.

ShellShocked

sorry pieman  :oops:

Mental

LOL cool nickname..
Pie Man..

speedslayer2

where do u put this script?

Blizzard

Quote from: speedslayer2where do u put this script?
Open the script editor and scroll down til "Main". Click on Main and choose "Insert". Below you can enter a name like "Dash script" or something. Just paste the whole script-code up there into the empty window to the right. :^^: Got it?
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!