| 
 
| 赞 | 0 |  
| VIP | 1 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 991 |  
| 最后登录 | 2013-7-30 |  
| 在线时间 | 47 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间47 小时注册时间2011-4-2帖子19 | 
| 
本帖最后由 love6clm 于 2011-12-7 20:55 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 各位大大好。
 我想问如何在战斗选择敌人的时候显示一张图片,取消选择的时候消失。
 还有就是怎么在使用技能的时候显示一张图片,伴随着技能名字消失而消失。
 
 我的意思是在选择敌人的时候、和释放技能的时候插入一些边框素材
 希望我的问题不会太难理解吧。
 感谢各位~
 
 
 第一个问题自己解决了,修改Scene_Battle 3
 #--------------------------------------------------------------------------
 # ● 开始选择敌人
 #--------------------------------------------------------------------------
 def start_enemy_select
 # 生成敌人箭头
 @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
 # 关联帮助窗口
 @enemy_arrow.help_window = @help_window
 @abc = Sprite.new
 @abc.bitmap = Bitmap.new("Graphics/Pictures/图片")
 # 无效化角色指令窗口
 @actor_command_window.active = false
 @actor_command_window.visible = false
 end
 #--------------------------------------------------------------------------
 # ● 结束选择敌人
 #--------------------------------------------------------------------------
 def end_enemy_select
 # 释放敌人箭头
 @enemy_arrow.dispose
 @enemy_arrow = nil
 @abc.dispose
 # 指令为 [战斗] 的情况下
 if @actor_command_window.index == 0
 # 有效化角色指令窗口
 @actor_command_window.active = true
 @actor_command_window.visible = true
 # 隐藏帮助窗口
 @help_window.visible = false
 end
 end
 
 
 
 
 
 参照上面的原理、第二个问题也相应解决了
 #--------------------------------------------------------------------------
 # ● 刷新画面 (主回合步骤 1 : 准备行动)
 #--------------------------------------------------------------------------
 def update_phase4_step1
 # 隐藏帮助窗口
 @help_window.visible = false
 @abc = Sprite.new
 ...........
 
 #--------------------------------------------------------------------------
 # ● 生成特技行动结果
 #--------------------------------------------------------------------------
 def make_skill_action_result
 # 获取特技
 @skill = $data_skills[@active_battler.current_action.skill_id]
 # 如果不是强制行动
 unless @active_battler.current_action.forcing
 # 因为 SP 耗尽而无法使用的情况下
 unless @active_battler.skill_can_use?(@skill.id)
 # 清除强制行动对像的战斗者
 $game_temp.forcing_battler = nil
 # 移至步骤 1
 @phase4_step = 1
 return
 end
 end
 # 消耗 SP
 @active_battler.sp -= @skill.sp_cost
 # 刷新状态窗口
 @status_window.refresh
 # 在帮助窗口显示特技名
 @help_window.set_text(@skill.name, 1)
 @abc.bitmap = Bitmap.new("Graphics/Pictures/图片")
 # 设置动画 ID
 @animation1_id = @skill.animation1_id
 @animation2_id = @skill.animation2_id
 # 设置公共事件 ID
 @common_event_id = @skill.common_event_id
 # 设置对像侧战斗者
 set_target_battlers(@skill.scope)
 # 应用特技效果
 for target in @target_battlers
 target.skill_effect(@active_battler, @skill)
 end
 end
 
 #--------------------------------------------------------------------------
 # ● 刷新画面 (主回合步骤 5 : 显示伤害)
 #--------------------------------------------------------------------------
 def update_phase4_step5
 # 隐藏帮助窗口
 @help_window.visible = false
 @abc.dispose
 # 刷新状态窗口
 @status_window.refresh
 # 显示伤害
 for target in @target_battlers
 if target.damage != nil
 target.damage_pop = true
 end
 end
 # 移至步骤 6
 @phase4_step = 6
 end
 
 
 
 
 一些小问题给大家带来麻烦,深表抱歉~
 | 
 评分
查看全部评分
 |