赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 4029 |
最后登录 | 2014-9-15 |
在线时间 | 36 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 36 小时
- 注册时间
- 2011-5-22
- 帖子
- 14
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本人试了试别的游戏的脚本,但是有个脚本无论如何都无法正常运行
javascript:; 求大神介绍一下怎么破
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 全ウィンドウの作成
#--------------------------------------------------------------------------
alias create_all_windows_fv create_all_windows
def create_all_windows
create_all_windows_fv
create_result_window
end
#--------------------------------------------------------------------------
# ● 全ウィンドウの更新
#--------------------------------------------------------------------------
def update_all_windows
super
@actor_arrow.update
@enemy_arrow.update
end
#--------------------------------------------------------------------------
# ● 全ウィンドウの解放
#--------------------------------------------------------------------------
def dispose_all_windows
super
@actor_arrow.dispose
@enemy_arrow.dispose
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの作成
#--------------------------------------------------------------------------
def create_help_window
@help_window = Window_Help.new
@help_window.visible = false
@arrow_help_window = Window_BtArrowHelp.new
end
#--------------------------------------------------------------------------
# ● 情報表示ビューポートの作成
#--------------------------------------------------------------------------
def create_info_viewport
@info_viewport = Viewport.new
@info_viewport.rect.y = Graphics.height - @status_window.height
@info_viewport.rect.height = @status_window.height
@info_viewport.z = 100
@info_viewport.ox = 64
end
#--------------------------------------------------------------------------
# ● パーティコマンドウィンドウの作成
#--------------------------------------------------------------------------
def create_party_command_window
@party_command_window = Window_PartyHorzCommand.new
@party_command_window.set_handler(:fight, method(:command_fight))
@party_command_window.set_handler(:escape, method(:command_escape))
@party_command_window.unselect
end
#--------------------------------------------------------------------------
# ● アクターコマンドウィンドウの作成
#--------------------------------------------------------------------------
def create_actor_command_window
case BtlrFv::CMD_WIN
when 1; @actor_command_window = Window_ActorIconCmd.new
when 2; @actor_command_window = WindowBattleActorCmd.new
else; @actor_command_window = Window_ActorCommand.new
end
@actor_command_window.set_handler(:attack, method(:command_attack))
@actor_command_window.set_handler(:skill, method(:command_skill))
@actor_command_window.set_handler(:guard, method(:command_guard))
@actor_command_window.set_handler(:item, method(:command_item))
@actor_command_window.set_handler(:cancel, method(:prior_command))
end
#--------------------------------------------------------------------------
# ● ステータスウィンドウの作成
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_BattleStatus.new
@status_window.y = Graphics.height - @status_window.height + 12
end
#--------------------------------------------------------------------------
# ● アクターウィンドウの作成
#--------------------------------------------------------------------------
def create_actor_window
@actor_arrow = BtArrow_Actor.new
@actor_arrow.set_handler(:ok, method(:on_actor_ok))
@actor_arrow.set_handler(:cancel, method(:on_actor_cancel))
end
#--------------------------------------------------------------------------
# ● 敵キャラウィンドウの作成
#--------------------------------------------------------------------------
def create_enemy_window
@enemy_arrow = BtArrow_Enemy.new
@enemy_arrow.set_handler(:ok, method(:on_enemy_ok))
@enemy_arrow.set_handler(:cancel, method(:on_enemy_cancel))
end
#--------------------------------------------------------------------------
# ● リザルトウィンドウの作成
#--------------------------------------------------------------------------
def create_result_window
@result_window = Window_FvBtResult.new
@result_window.set_handler(:ok, method(:on_result_ok))
BattleManager.set_result_method(method(:set_result), method(:wait_result))
end
#--------------------------------------------------------------------------
# ● リザルトウィンドウの設定
#--------------------------------------------------------------------------
def set_result(result)
@result_window.set_result(result)
end
#--------------------------------------------------------------------------
# ● リザルトウィンドウの設定
#--------------------------------------------------------------------------
def wait_result
loop do
update_basic
break if @result_window.finish? and Input.trigger?(:C)
end
end
#--------------------------------------------------------------------------
# ● リザルト表示OK
#--------------------------------------------------------------------------
def on_result_ok
@result_window.finish unless @result_window.finish?
end
if BtlrFv::USE_ACTION_ICN
#--------------------------------------------------------------------------
# ● 次のコマンド入力へ
#--------------------------------------------------------------------------
alias next_command_xpbtfv next_command
def next_command
@status_window.redraw_bt_cmd_icon(BattleManager.actor.index) unless BattleManager.actor.nil?
next_command_xpbtfv
end
#--------------------------------------------------------------------------
# ● 前のコマンド入力へ
#--------------------------------------------------------------------------
alias prior_command_xpbtv prior_command
def prior_command
@status_window.redraw_bt_cmd_icon(BattleManager.actor.index, false)
prior_command_xpbtv
end
end
#--------------------------------------------------------------------------
# ● アクターコマンド選択の開始
#--------------------------------------------------------------------------
def start_actor_command_selection
@status_window.redraw_bt_cmd_icon(BattleManager.actor.index) if BtlrFv::USE_ACTION_ICN
# @status_window.select(BattleManager.actor.index)
@party_command_window.close
@actor_command_window.setup(BattleManager.actor)
end
#--------------------------------------------------------------------------
# ● アクター選択の開始
#--------------------------------------------------------------------------
def select_actor_selection
@actor_arrow.index = BattleManager.actor.index # 使用者
@actor_arrow.help_window = @arrow_help_window
@actor_arrow.show.activate
end
#--------------------------------------------------------------------------
# ● アクター[決定]
#--------------------------------------------------------------------------
def on_actor_ok
BattleManager.actor.input.target_index = @actor_arrow.index
@actor_arrow.hide
@arrow_help_window.clear.close
@skill_window.hide
@item_window.hide
next_command
end
#--------------------------------------------------------------------------
# ● アクター[キャンセル]
#--------------------------------------------------------------------------
def on_actor_cancel
@actor_arrow.hide
@arrow_help_window.clear.close
case @actor_command_window.current_symbol
when :attack
@actor_command_window.open.activate
when :skill
@skill_window.show.activate
when :item
@item_window.show.activate
end
end
#--------------------------------------------------------------------------
# ● 敵キャラ選択の開始
#--------------------------------------------------------------------------
def select_enemy_selection
@enemy_arrow.index = 0
@enemy_arrow.help_window = @arrow_help_window
@enemy_arrow.show.activate
end
#--------------------------------------------------------------------------
# ● 敵キャラ[決定]
#--------------------------------------------------------------------------
def on_enemy_ok
BattleManager.actor.input.target_index = @enemy_arrow.enemy.index
@enemy_arrow.hide
@arrow_help_window.clear.close
@skill_window.hide
@item_window.hide
next_command
end
#--------------------------------------------------------------------------
# ● 敵キャラ[キャンセル]
#--------------------------------------------------------------------------
def on_enemy_cancel
@enemy_arrow.hide
@arrow_help_window.clear.close
case @actor_command_window.current_symbol
when :attack
@actor_command_window.open.activate
when :skill
@skill_window.show.activate
when :item
@item_window.show.activate
end
end
#--------------------------------------------------------------------------
# ● スキル[決定]
#--------------------------------------------------------------------------
def on_skill_ok
@skill_window.hide
@skill = @skill_window.item
BattleManager.actor.input.set_skill(@skill.id)
BattleManager.actor.last_skill.object = @skill
if [email protected]_selection?
@skill_window.hide
next_command
elsif @skill.for_opponent?
select_enemy_selection
else
select_actor_selection
end
end
#--------------------------------------------------------------------------
# ● スキル[キャンセル]
#--------------------------------------------------------------------------
def on_skill_cancel
@skill_window.hide
@actor_command_window.open.activate
end
#--------------------------------------------------------------------------
# ● アイテム[決定]
#--------------------------------------------------------------------------
def on_item_ok
@item_window.hide
@item = @item_window.item
BattleManager.actor.input.set_item(@item.id)
if [email protected]_selection?
@item_window.hide
next_command
elsif @item.for_opponent?
select_enemy_selection
else
select_actor_selection
end
$game_party.last_item.object = @item
end
#--------------------------------------------------------------------------
# ● アイテム[キャンセル]
#--------------------------------------------------------------------------
def on_item_cancel
@item_window.hide
@actor_command_window.open.activate
end
#--------------------------------------------------------------------------
# ● 攻撃アニメーションの表示 [再定義]
# targets : 対象者の配列
# アクターの場合は二刀流を考慮(左手武器は反転して表示)。
# 敵キャラの場合は [敵の通常攻撃] 効果音を演奏して一瞬待つ。
#--------------------------------------------------------------------------
def show_attack_animation(targets)
if @subject.actor? or (@subject.enemy? and @subject.use_atk_animation?)
show_normal_animation(targets, @subject.atk_animation_id1, false)
show_normal_animation(targets, @subject.atk_animation_id2, true)
else
Sound.play_enemy_attack
abs_wait_short
end
end
end
|
|