Courrir
Info:C'est pour courrir avec la
touche Z. Vous aurez besoin de cette ressource:
-
en voici quelques autres:
-
-
-
-
-
-
et nommez la/les: le nom que vous voulez_dash .
Ex : 001-Fighter01_dashOu mettre le scripte: Au-dessus de Main avec comme nom Dash_Mode (vous pouvez mettre n'importe quel nom)
Scripte:
- Citation :
- #==============================================================================
# ++ グラフィック変更ダッシュ ver. 1.11 ++
# Script by パラ犬
# http://rpg.para.s3p.net/
#------------------------------------------------------------------------------
# 「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
# ダッシュ禁止イベントスイッチID
# (イベントコマンド「スイッチの操作」でこの番号のスイッチをONにしている間は
# ダッシュを機能を無効にします)
NO_DASH_SWITCH = 999
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias dash_update update
def update
# 移動中、イベント実行中、移動ルート強制中、
# メッセージウィンドウ表示中のいずれでもない場合
unless moving? or $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)
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