设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1990|回复: 5
打印 上一主题 下一主题

[已经过期] 求教 bug不会破

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
36 小时
注册时间
2011-5-22
帖子
14
跳转到指定楼层
1
发表于 2014-5-2 17:27:13 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

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

点评

别的游戏的脚本……去问那个游戏的作者呗……  发表于 2014-5-2 17:29

Lv1.梦旅人

梦石
0
星屑
50
在线时间
36 小时
注册时间
2011-5-22
帖子
14
2
 楼主| 发表于 2014-5-2 17:53:48 | 只看该作者
太早了。。找不清楚了。。求大神别嘲讽。。不然问都问不出来了。。

点评

部分内容不全,大概就是这样;如果脚本就这样没了那应该需要配合一些其他脚本用(很多作者都喜欢另外写个核心脚本)  发表于 2014-5-2 21:19
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
466 小时
注册时间
2013-2-8
帖子
424
3
发表于 2014-5-2 22:48:55 手机端发表。 | 只看该作者
请您先给出该游戏的脚本使用授权。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
36 小时
注册时间
2011-5-22
帖子
14
4
 楼主| 发表于 2014-5-3 00:13:17 | 只看该作者
maxdpy 发表于 2014-5-2 17:53
太早了。。找不清楚了。。求大神别嘲讽。。不然问都问不出来了。。

他大概的意思是说有一个action-icn被别的占用然后怎么着  结果游戏说这个条件不对

点评

我可以肯定你的理解是错的= =  发表于 2014-5-4 03:58
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
295
在线时间
141 小时
注册时间
2011-5-13
帖子
250
5
发表于 2014-5-3 08:02:10 | 只看该作者
RUBY 代码复制
  1. 把代码写在这里啊!
  2. 你那个看着麻烦……

评分

参与人数 1星屑 +20 收起 理由
taroxd + 20 我很赞同

查看全部评分

认真你就输了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
150 小时
注册时间
2010-6-19
帖子
45
6
发表于 2014-5-3 18:54:39 | 只看该作者
124横调用了一个常量
124. if BtlrFv::USE_ACTION_ICN
BtlrFv类中的常量USE_ACTION_ICN
可能因为你没有复制BtlrFv类而导致的名称错误
把那个游戏中BtlrFv类复制过来就行,但是不保证你复制别人的脚本还会出什么差错
还有不要在别人游戏中复制脚本,
其一是新手搞不懂人家脚本的结构可能会出错,
其二是需要人家的使用授权。
啊哈.......
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-2-23 07:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表