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

Project1

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

[已经解决] 如何在战斗显示技能动画之前先显示图片?

[复制链接]

Lv1.梦旅人

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

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

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

x
本帖最后由 akachin 于 2014-5-24 15:43 编辑

想在角色使用一个技能后,先显示一张图片(大概是角色立绘这样的东西),然后再显示技能的动画。
(在技能那里公共事件好像图片会在技能动画过后显示啊…………)
如果要打比方的话,就像是东方绯想天和非想天则使用符卡时那样,先出立绘,然后攻击。
这种是要用技能动画实现吗?对动画不是很了解,只有这一种办法的话希望能详细地讲解一下,谢谢!

点评

只要一出现[url=home.php?mod=space&uid=103426][/url]这段就删了,保留中间那段@XX的  发表于 2014-5-24 15:16
109行那里删掉[url=home.php?mod=space&uid=103426][/url],保留@User  发表于 2014-5-24 14:45

Lv1.梦旅人

梦石
0
星屑
211
在线时间
845 小时
注册时间
2014-5-5
帖子
944
2
发表于 2014-5-19 12:22:27 | 只看该作者
本帖最后由 邪月长啸 于 2014-5-19 12:25 编辑

  1. #==============================================================================
  2. # ■ 出招更换战斗背景效果 By 绿发的Eclair v1.1
  3. #
  4. # 部分商业游戏的魔法特技使用时战斗背景会变成各种各样华丽的图片,配合上华丽的魔
  5. # 法效果甚至可以造成一种浑然一体的美感效果,大红心~~
  6. # 用RM模拟了~~~
  7. # 使用方法:在数据库中添加属性,名字格式为 背景更换,背景的名字
  8. # 带有这个属性的战斗行动在执行时会将战斗背景渐变更换为Battleback文件夹里面
  9. # 一个叫“背景的名字”的图片,当然名字可以自定。
  10. # 一定要用英文逗号分割 背景更换 和 要更换的背景名字哦~不然会出错的~~~
  11. # 这个脚本使用了三次alias,如果说在这部分存在一些迷惑的话勉强可以做范例吧~~
  12. # 除去防御时候换背景的BUG....另外将更换背景的步骤放在显示敌人动画那里了~~~
  13. # 看起来会更舒服一些呢~~
  14. # 祝您玩得愉快哦~
  15. #==============================================================================
  16. #==============================================================================
  17. # ■ Spriteset_Battle
  18. #------------------------------------------------------------------------------
  19. #  处理战斗画面的活动块的类。本类在 Scene_Battle 类
  20. # 的内部使用。
  21. #==============================================================================
  22. class Spriteset_Battle
  23.   attr_accessor :battleback_realname  
  24.   attr_accessor :battleback_sprite
  25.   alias cat_miaomiao initialize
  26.   def initialize
  27.     @battleback_realname = $game_temp.battleback_name
  28.     cat_miaomiao
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 刷新画面
  32.   #--------------------------------------------------------------------------
  33.   def update
  34.     # 刷新角色的活动块 (对应角色的替换)
  35.     @actor_sprites[0].battler = $game_party.actors[0]
  36.     @actor_sprites[1].battler = $game_party.actors[1]
  37.     @actor_sprites[2].battler = $game_party.actors[2]
  38.     @actor_sprites[3].battler = $game_party.actors[3]
  39.     # 战斗背景的文件名与现在情况有差异的情况下
  40.     if @battleback_name != @battleback_realname
  41.       @battleback_name = @battleback_realname
  42.       if @battleback_sprite.bitmap != nil and @battleback_realname == $game_temp.battleback_name
  43.         @battleback_sprite.bitmap.dispose
  44.       end
  45.       if @battleback_name != nil
  46.       @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
  47.       @battleback_sprite.src_rect.set(0, 0, 640, 480)
  48.     end
  49.     end
  50.     # 刷新战斗者的活动块
  51.     for sprite in @enemy_sprites + @actor_sprites
  52.       sprite.update
  53.     end
  54.     # 刷新天气图形
  55.     @weather.type = $game_screen.weather_type
  56.     @weather.max = $game_screen.weather_max
  57.     @weather.update
  58.     # 刷新图片活动块
  59.     for sprite in @picture_sprites
  60.       sprite.update
  61.     end
  62.     # 刷新计时器活动块
  63.     @timer_sprite.update
  64.     # 设置画面的色调与震动位置
  65.     @viewport1.tone = $game_screen.tone
  66.     @viewport1.ox = $game_screen.shake
  67.     # 设置画面的闪烁色
  68.     @viewport4.color = $game_screen.flash_color
  69.     # 刷新显示端口
  70.     @viewport1.update
  71.     @viewport2.update
  72.     @viewport4.update
  73.   end
  74. end
  75. #==============================================================================
  76. # ■ Scene_Battle (分割定义 4)
  77. #------------------------------------------------------------------------------
  78. #  处理战斗画面的类。
  79. #==============================================================================
  80. class Scene_Battle
  81.   #--------------------------------------------------------------------------
  82.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  83.   #--------------------------------------------------------------------------
  84.   alias kiss_cat update_phase4_step4
  85.   def update_phase4_step4
  86.   @use = []
  87.     @use = @active_battler.element_set if @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
  88.     if @active_battler.current_action.kind == 1
  89.     @use = $data_skills[@active_battler.current_action.skill_id].element_set
  90.     end
  91.     if @active_battler.current_action.kind == 2
  92.     @use = $data_items[@active_battler.current_action.item_id].element_set
  93.   end
  94.     for i in @use
  95.     if $data_system.elements[i].split(/,/)[0] == ""
  96.       for j in 0...10
  97.         @spriteset.battleback_sprite.opacity -= 25
  98.         Graphics.update
  99.       end
  100.     @spriteset.battleback_realname = $data_system.elements[i].split(/,/)[1]
  101.      @spriteset.update
  102.       for j in 0...10
  103.         @spriteset.battleback_sprite.opacity += 25
  104.         Graphics.update
  105.       end
  106.     break
  107.   end
  108. end
  109.     kiss_cat
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 刷新画面 (主回合步骤 6 : 刷新)
  113.   #--------------------------------------------------------------------------
  114.   alias touch_cat update_phase4_step6
  115.   def update_phase4_step6
  116.     if @spriteset.battleback_realname != $game_temp.battleback_name
  117.       for j in 0...10
  118.         @spriteset.battleback_sprite.opacity -= 25
  119.         Graphics.update
  120.       end
  121.     @spriteset.battleback_realname =  $game_temp.battleback_name
  122.      @spriteset.update
  123.       for j in 0...10
  124.         @spriteset.battleback_sprite.opacity += 25
  125.         Graphics.update
  126.       end
  127.       end
  128.     touch_cat
  129.   end
  130. end
复制代码

点评

额,那个抱歉,没注意到,o(╯□╰)o  发表于 2014-5-19 12:41
这里是VA区不是XP区= =  发表于 2014-5-19 12:36
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
342
在线时间
377 小时
注册时间
2013-1-30
帖子
219
3
发表于 2014-5-19 13:27:00 | 只看该作者
最简单的方法,设置一个A技能(无伤害、无动画),A技能就只有一个公共事件,公共事件里出现立绘后再接上一个有动画有伤害的B技能就行了DAZE

点评

刚才试了下,但是这么做的话在使用A技能的时候,顶上会出现那个“使用时的信息”,就是什么“XX使用了XX!”……有什么办法把那行字去掉吗?  发表于 2014-5-19 13:48
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
342
在线时间
377 小时
注册时间
2013-1-30
帖子
219
4
发表于 2014-5-19 14:04:39 | 只看该作者
本帖最后由 qknight 于 2014-5-19 17:00 编辑

很简单,A技能下面使用信息的那行字“使用了XXX”什么的都删掉就行了

当然也可以设定成发动A技能时——XX使用了符卡YY,或者XX:人物名台词
这样就显得不突兀
然后公共事件时除了放图片还可以加台词、加配音,非常给力!

点评

确实!感谢建议!  发表于 2014-5-19 20:58
不是的,它会只显示使用者的名字  发表于 2014-5-19 15:18
回复 支持 反对

使用道具 举报

Lv4.逐梦者

运否天赋

梦石
10
星屑
5243
在线时间
3567 小时
注册时间
2014-5-15
帖子
1599

开拓者

5
发表于 2014-5-19 19:54:36 | 只看该作者
回答楼上的问题,你只需要在A技能的使用效果栏里加一个100%附加的空白状态就行了,这样就不会显示使用者名字。

点评

具体怎么做……?我加了但是还是显示了…………  发表于 2014-5-19 21:03
土猫三国开发完成
回复 支持 反对

使用道具 举报

Lv4.逐梦者

运否天赋

梦石
10
星屑
5243
在线时间
3567 小时
注册时间
2014-5-15
帖子
1599

开拓者

6
发表于 2014-5-19 21:18:47 | 只看该作者

技能栏里附加状态

然后状态这样设置,下面的各种信息都不填。

点评

我这样设置了之后……它还是显示了|||?  发表于 2014-5-19 21:29
土猫三国开发完成
回复 支持 反对

使用道具 举报

Lv4.逐梦者

运否天赋

梦石
10
星屑
5243
在线时间
3567 小时
注册时间
2014-5-15
帖子
1599

开拓者

7
发表于 2014-5-19 21:37:08 | 只看该作者
好吧,A技能还是写点描述吧我没看清问题...加状态可以消除放技能后显示敌方相关文字的现象,使用者的名字确实无解。。。。
土猫三国开发完成
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
748
在线时间
2064 小时
注册时间
2011-10-3
帖子
1686
8
发表于 2014-5-20 16:33:33 | 只看该作者
在外站见过2,3个这种类型的脚本,早知道有人要用我当时就收藏了……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
35 小时
注册时间
2014-2-10
帖子
138
9
发表于 2014-5-21 09:47:00 | 只看该作者
他有这种脚本 @子弹君  

本人的游戏主页:YBGame
回复 支持 反对

使用道具 举报

Lv2.观梦者 (暗夜天使)

卑微的梦

梦石
0
星屑
517
在线时间
820 小时
注册时间
2013-2-23
帖子
1185

短篇九勇士组季军

10
发表于 2014-5-21 13:01:03 | 只看该作者
本帖最后由 子弹君 于 2014-5-24 13:56 编辑

使用方法:技能栏备注里填上[コモン呼出 = N] N为公共事件ID
  1. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  2. #==============================================================================
  3. #                   ◆ コモンイベント呼出し ver2.03 ◆ VX Ace ◆
  4. #                                                     by Oz
  5. #------------------------------------------------------------------------------
  6. #  スキル発動前にコモンイベントを呼び出します。スキルの詠唱イベントとかに
  7. # 使えると思います。スキルのメモに
  8. # [コモン呼出(call commonでもok) コモンイベントID]
  9. # と記述するとスキル使用前にコモンイベントIDを実行します。
  10. # イベントのスクリプトで使用者のユニット、使用者、スキルを取得したい場合は、
  11. # 以下のメソッドをイベントのスクリプトで呼び出すことで取得できます。
  12. # user_unit_in_battle  →  使用者が味方ならtrue、敵ならfalse
  13. # user_in_battle      → スキル発動したキャラのIDです。
  14. # use_skill_in_battle  →  発動するスキルIDです。
  15. # よくわかんない人用にDBの変数に入れることもできます。使わない場合 nil に
  16. # にしてください。
  17. # 戦闘中以外に呼び出した場合、0を返します。(使用者のユニットはtrueを返します。)
  18. # 戦闘前、勝利時、敗北時、逃走時にコモンイベントを呼び出せるようにしました。
  19. # 0を指定するとコモンイベントは呼び出ししません。
  20. # Call_Common_Event.phase で戦闘開始前、勝利時、敗北時、逃走時を取得できます。
  21. #==============================================================================

  22. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  23. $imported = {} if $imported == nil
  24. $imported["Call_Common_Event"] = true

  25. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  26. #==============================================================================
  27. # ★ 設定項目 Call Common Event ★
  28. #==============================================================================

  29. module Call_Common_Event
  30.   #スキル発動者のユニット用変数(0:敵、1:味方)
  31.   User_Unit_Variable_ID = nil
  32.   #スキル発動者用変数
  33.   User_Variable_ID = nil
  34.   #スキル用変数
  35.   Use_Skill_Variable_ID = nil
  36.   #戦闘前
  37.   Standby_Event_ID = 0
  38.   #戦闘勝利時
  39.   Won_Event_ID = 4
  40.   #戦闘敗北時
  41.   Defeat_Event_ID = 0
  42.   #戦闘逃走時
  43.   Escaped_Event_ID = 0
  44. end

  45. #==============================================================================
  46. # ★ 設定項目 Call Common Event ★
  47. #==============================================================================

  48. module Call_Common_Event_System_Word
  49.   Call_Common_Event = /\[(?:コモン呼出|call\s*common)\s*[==]\s*(\d+)\]/i
  50. end

  51. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  52. #==============================================================================
  53. # ■ RPG::Item
  54. #==============================================================================

  55. class RPG::UsableItem
  56.   #------------------------------------------------------------------------
  57.   # ○ キャッシュを生成
  58.   #------------------------------------------------------------------------
  59.   def create_call_common_event_cache
  60.     @call_common_event = false
  61.     @call_common_event_id = 0
  62.     self.note.each_line{|line|
  63.       case line
  64.       when Call_Common_Event_System_Word::Call_Common_Event
  65.         @call_common_event = true
  66.         @call_common_event_id = $1.to_i
  67.       end
  68.     }
  69.   end
  70.   #------------------------------------------------------------------------
  71.   # ○ コモン呼出?
  72.   #------------------------------------------------------------------------
  73.   def call_common_event?
  74.     create_call_common_event_cache if @call_common_event.nil?
  75.     return @call_common_event
  76.   end
  77.   #------------------------------------------------------------------------
  78.   # ○ コモン呼出ID
  79.   #------------------------------------------------------------------------
  80.   def call_common_event_id
  81.     create_call_common_event_cache unless @call_common_event_id
  82.     return @call_common_event_id
  83.   end
  84. end

  85. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  86. #==============================================================================
  87. # ■ Call Common Event
  88. #==============================================================================

  89. module Call_Common_Event
  90.   #--------------------------------------------------------------------------
  91.   # ● メンバ変数の初期化
  92.   #--------------------------------------------------------------------------
  93.   def self.initialize(proc = nil)
  94.     @user_unit = true
  95.     [url=home.php?mod=space&uid=103426]@User[/url] = 0
  96.     @use_skill = 0
  97.     @call_event_proc = proc
  98.     @phase = :standby
  99.     clear_last_battler
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ● ユニット
  103.   #--------------------------------------------------------------------------
  104.   def self.user_unit
  105.     initialize if @user_unit.nil?
  106.     return @user_unit
  107.   end
  108.   #--------------------------------------------------------------------------
  109.   # ● 発動者
  110.   #--------------------------------------------------------------------------
  111.   def self.user
  112.     initialize unless [url=home.php?mod=space&uid=103426]@User[/url]   
  113.     return @user
  114.   end
  115.   #--------------------------------------------------------------------------
  116.   # ● スキル
  117.   #--------------------------------------------------------------------------
  118.   def self.use_skill
  119.     initialize unless @use_skill
  120.     return @use_skill
  121.   end
  122.   #--------------------------------------------------------------------------
  123.   # ● フェイズ
  124.   #--------------------------------------------------------------------------
  125.   def self.phase
  126.     initialize unless @phase
  127.     return @phase
  128.   end
  129.   #--------------------------------------------------------------------------
  130.   # ● ユニット
  131.   #--------------------------------------------------------------------------
  132.   def self.user_unit=(user_unit)
  133.     @user_unit = user_unit
  134.     self.user_unit_variable = user_unit
  135.   end
  136.   #--------------------------------------------------------------------------
  137.   # ● 発動者
  138.   #--------------------------------------------------------------------------
  139.   def self.user=(user)
  140.     @user = user
  141.     self.user_variable = user
  142.   end
  143.   #--------------------------------------------------------------------------
  144.   # ● スキル
  145.   #--------------------------------------------------------------------------
  146.   def self.use_skill=(skill)
  147.     @use_skill = skill
  148.     self.use_skill_variable = skill
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   # ● ユニット変数
  152.   #--------------------------------------------------------------------------
  153.   def self.user_unit_variable=(value)
  154.     return unless User_Unit_Variable_ID
  155.     $game_variables[User_Unit_Variable_ID] = value ? 1 : 0
  156.   end
  157.   #--------------------------------------------------------------------------
  158.   # ● 発動者変数
  159.   #--------------------------------------------------------------------------
  160.   def self.user_variable=(value)
  161.     return unless User_Variable_ID
  162.     $game_variables[User_Variable_ID] = value
  163.   end
  164.   #--------------------------------------------------------------------------
  165.   # ● 発動スキル変数
  166.   #--------------------------------------------------------------------------
  167.   def self.use_skill_variable=(value)
  168.     return unless Use_Skill_Variable_ID
  169.     $game_variables[Use_Skill_Variable_ID] = value
  170.   end
  171.   #--------------------------------------------------------------------------
  172.   # ● 戦闘開始前
  173.   #--------------------------------------------------------------------------
  174.   def self.standby?
  175.     @phase == :standby
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # ● 勝利後
  179.   #--------------------------------------------------------------------------
  180.   def self.won?
  181.     @phase == :won
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● 敗北後
  185.   #--------------------------------------------------------------------------
  186.   def self.defeat?
  187.     @phase == :defeat
  188.   end
  189.   #--------------------------------------------------------------------------
  190.   # ● 逃走中
  191.   #--------------------------------------------------------------------------
  192.   def self.escaped?
  193.     @phase == :escaped
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ● 開始前
  197.   #--------------------------------------------------------------------------
  198.   def self.call_standby_event
  199.     return unless Standby_Event_ID > 0
  200.     @phase = :standby
  201.     @call_event_proc.call(Standby_Event_ID) if @call_event_proc
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● 勝利時
  205.   #--------------------------------------------------------------------------
  206.   def self.call_won_event
  207.     return unless Won_Event_ID > 0
  208.     @phase = :won
  209.     @call_event_proc.call(Won_Event_ID) if @call_event_proc
  210.   end
  211.   #--------------------------------------------------------------------------
  212.   # ● 敗北時
  213.   #--------------------------------------------------------------------------
  214.   def self.call_defeat_event
  215.     return unless Defeat_Event_ID > 0
  216.     @phase = :defeat
  217.     @call_event_proc.call(Defeat_Event_ID) if @call_event_proc
  218.   end
  219.   #--------------------------------------------------------------------------
  220.   # ● 逃走時
  221.   #--------------------------------------------------------------------------
  222.   def self.call_escaped_event
  223.     return unless Escaped_Event_ID > 0
  224.     @phase = :escaped
  225.     @call_event_proc.call(Escaped_Event_ID) if @call_event_proc
  226.   end
  227.   #--------------------------------------------------------------------------
  228.   # ● 最後の行動者
  229.   #--------------------------------------------------------------------------
  230.   def self.last_battler=(battler)
  231.     @last_battler = battler
  232.   end
  233.   #--------------------------------------------------------------------------
  234.   # ● アクター:ランダム
  235.   #--------------------------------------------------------------------------
  236.   def self.actor_randam
  237.     members = $game_party.alive_members
  238.     actor = members[rand * members.size]
  239.     return actor ? actor.id : 0
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● アクター:最後の行動者
  243.   #--------------------------------------------------------------------------
  244.   def self.last_actor
  245.     return 0 if @last_battler.nil? || @last_battler.enemy?
  246.     return @last_battler.actor.id
  247.   end
  248.   #--------------------------------------------------------------------------
  249.   # ● エネミー:最後の行動者
  250.   #--------------------------------------------------------------------------
  251.   def self.last_enemy
  252.     return 0 if @last_battler.nil? || @last_battler.actor?
  253.     return @last_battler.enemy.id
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # ● 最後の行動者:クリアー
  257.   #--------------------------------------------------------------------------
  258.   def self.clear_last_battler
  259.     @last_battler = nil
  260.   end
  261. end

  262. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  263. #==============================================================================
  264. # ■ BattleManager
  265. #------------------------------------------------------------------------------
  266. #  戦闘の進行を管理するモジュールです。
  267. #==============================================================================

  268. class << BattleManager
  269.   #--------------------------------------------------------------------------
  270.   # ● 戦闘開始
  271.   #--------------------------------------------------------------------------
  272.   alias call_common_event_battle_start battle_start
  273.   def battle_start
  274.     call_common_event_battle_start
  275.     Call_Common_Event.call_standby_event
  276.   end
  277.   #--------------------------------------------------------------------------
  278.   # ● 勝利の処理
  279.   #--------------------------------------------------------------------------
  280.   alias call_common_event_process_victory process_victory
  281.   def process_victory
  282.     return if Call_Common_Event.won?
  283.     Call_Common_Event.call_won_event
  284.     call_common_event_process_victory   
  285.   end
  286.   #--------------------------------------------------------------------------
  287.   # ● 中断の処理
  288.   #--------------------------------------------------------------------------
  289.   alias call_common_event_process_abort process_abort
  290.   def process_abort
  291.     return if Call_Common_Event.escaped?
  292.     Call_Common_Event.call_escaped_event
  293.     call_common_event_process_abort
  294.   end
  295.   #--------------------------------------------------------------------------
  296.   # ● 敗北の処理
  297.   #--------------------------------------------------------------------------
  298.   alias call_common_event_process_defeat process_defeat
  299.   def process_defeat
  300.     return if Call_Common_Event.defeat?
  301.     Call_Common_Event.call_defeat_event
  302.     call_common_event_process_defeat
  303.   end
  304. end

  305. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  306. #==============================================================================
  307. # ? Command
  308. #==============================================================================

  309. module Commands
  310.   module_function
  311.   #--------------------------------------------------------------------------
  312.   # ● ユーザのユニット
  313.   #--------------------------------------------------------------------------
  314.   def user_unit_in_battle
  315.     return true unless $game_party.in_battle
  316.     Call_Common_Event.user_unit
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ● ユーザ
  320.   #--------------------------------------------------------------------------
  321.   def user_in_battle
  322.     return 0 unless $game_party.in_battle
  323.     Call_Common_Event.user
  324.   end
  325.   #--------------------------------------------------------------------------
  326.   # ● 発動スキル
  327.   #--------------------------------------------------------------------------
  328.   def use_skill_in_battle
  329.     return 0 unless $game_party.in_battle
  330.     Call_Common_Event.use_skill
  331.   end
  332. end

  333. class Game_Interpreter
  334.   include Commands
  335. end

  336. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  337. #==============================================================================
  338. # ■ Scene_Battle
  339. #------------------------------------------------------------------------------
  340. #  バトル画面の処理を行うクラスです。
  341. #==============================================================================

  342. class Scene_Battle < Scene_Base
  343.   #--------------------------------------------------------------------------
  344.   # ● 開始処理
  345.   #--------------------------------------------------------------------------
  346.   alias call_common_event_start start
  347.   def start
  348.     Call_Common_Event.initialize(method(:call_common_event))
  349.     call_common_event_start
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   # ● 戦闘行動終了時の処理
  353.   #--------------------------------------------------------------------------
  354.   alias call_common_event_process_action_end process_action_end
  355.   def process_action_end
  356.     unless call_common_event_process_action_end
  357.       Call_Common_Event.clear_last_battler
  358.       return false
  359.     else
  360.       return true
  361.     end
  362.   end
  363.   #--------------------------------------------------------------------------
  364.   # ● スキル/アイテムの使用
  365.   #--------------------------------------------------------------------------
  366.   alias call_common_event_use_item use_item
  367.   def use_item
  368.     item = @subject.current_action.item
  369.     Call_Common_Event.last_battler = @subject
  370.     Call_Common_Event.use_skill = item.id
  371.     Call_Common_Event.user_unit = @subject.actor?
  372.     Call_Common_Event.user = @subject.actor? ? @subject.actor.id : @subject.enemy.id
  373.     call_common_event(item.call_common_event_id) if item.call_common_event?
  374.     call_common_event_use_item
  375.   end
  376.   #--------------------------------------------------------------------------
  377.   # ● 反撃の発動
  378.   #--------------------------------------------------------------------------
  379.   alias call_common_event_invoke_counter_attack invoke_counter_attack
  380.   def invoke_counter_attack(target, item)
  381.     Call_Common_Event.last_battler = target
  382.     invoke_counter_attack(target, item)   
  383.   end
  384.   #--------------------------------------------------------------------------
  385.   # ● コモンイベントの呼び出し
  386.   #--------------------------------------------------------------------------
  387.   def call_common_event(common_event_id)
  388.     $game_temp.reserve_common_event(common_event_id)
  389.     process_event
  390.   end
  391. end

  392. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
复制代码

点评

可以了\TpT/谢谢!  发表于 2014-5-24 15:19
现在109行应该是@User = 0吗?它又出现126行syntax error了………………  发表于 2014-5-24 15:11
有时候我好讨厌论坛的@系统...  发表于 2014-5-24 14:45
脚本第109行发生syntax error……  发表于 2014-5-24 14:38

评分

参与人数 1星屑 +200 收起 理由
taroxd + 200 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-25 09:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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