deadcell Trouvère Follet
Nombre de messages : 625 Age : 35 Niveau Rpg Maker : Excellent Niveau Jeux Préférés : Final Fantasy, Resident evil... Date d'inscription : 21/03/2007
| Sujet: Courrir Jeu 26 Juil 2007, 12:37 | |
| Auteur: Inconnu Fonction: Permet au héros de courrir. Ressources: Il vous faut mettre cette image: PS: Vous pouvez mettre n’importe quelle image mais il faut que son nom finisse par "_dash" Screen: auncun Créez un nouveau script au dessus de " Main" et nommez-le " Dash_mode" et collez le script suivant: - Code:
-
#============================================================================== # ++ グラフィック変更ダッシュ ver. 1.11 ++ # #------------------------------------------------------------------------------ # 「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 | |
|
Invité Invité
| Sujet: Re: Courrir Lun 03 Sep 2007, 13:00 | |
| Sa me met Dash_Mode ????? syntax error ??? |
|
deadcell Trouvère Follet
Nombre de messages : 625 Age : 35 Niveau Rpg Maker : Excellent Niveau Jeux Préférés : Final Fantasy, Resident evil... Date d'inscription : 21/03/2007
| Sujet: Re: Courrir Jeu 13 Sep 2007, 17:23 | |
| Ok, ça te met juste ça ? ou tu as une erreur précise à une ligne précise ? | |
|