Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Dash script need help on it...

hello i need help to make the script work like this...

here is the dash script i have...

Code:
# -- Code provenant de RTGames, ne l'enregistrez pas, fa?tes un copier/coller direct.
#==============================================================================
# ++ グラフィック変更ダッシュ 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


Where the code says SPEED_DASH = 5
i would like to have instead of a number... (the agi of the character/1000)

like: speed_dash = character.agi

answer me when its possible and i need a real answer
not just talking ... i am still waiting for that script for my game...
thank you
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top