Project1

标题: 新手求教 关于魔法的问题 [打印本页]

作者: dbshy    时间: 2008-6-29 06:33
标题: 新手求教 关于魔法的问题
比如治疗魔法,只能选一个人,有没有办法做成多人,由玩家选择是哪几个... [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 灯笼菜刀王    时间: 2008-6-29 06:36
事件,文章选项,伤害处理{/cy}

------厚道的分割线--------------

http://rpg.blue/web/htm/news578.htm

楼主要的效果和这个差不多吧,不过这个是随机指定,自己改成可以选择的就行了

PS:这个脚本个人觉得不好用- -~
作者: dbshy    时间: 2008-6-29 06:40
以下引用灯笼菜刀王于2008-6-28 22:36:07的发言:

事件,文章选项,伤害处理


TF加54之

我的意思是在战斗中,比如说治疗这个魔法,可以选择多个人,并由玩家选择...
作者: 灯笼菜刀王    时间: 2008-6-29 06:41
- -已经厚道的补上去了,刚才找文章去了。
作者: dbshy    时间: 2008-6-29 06:47


以下引用灯笼菜刀王于2008-6-28 22:36:07的发言:



楼主要的效果和这个差不多吧,不过这个是随机指定,自己改成可以选择的就行了

PS:这个脚本个人觉得不好用- -~


[本贴由作者于 2008-6-28 22:41:00 最后编辑]


脚本跟我的要的根本不是一个概念

我只想问如何选择..
作者: 灯笼菜刀王    时间: 2008-6-29 06:51
多个选择对象么。

话说我也想要这样的功能,关注这个帖子~~
作者: dbshy    时间: 2008-6-29 19:53
高手在哪里
作者: 星语心の梦    时间: 2008-6-30 04:23
提示: 作者被禁止或删除 内容自动屏蔽
作者: Infrared    时间: 2008-6-30 05:47
提示: 作者被禁止或删除 内容自动屏蔽
作者: dbshy    时间: 2008-6-30 05:53
选了一个,然后再继续选
作者: Infrared    时间: 2008-6-30 06:21
提示: 作者被禁止或删除 内容自动屏蔽
作者: dbshy    时间: 2008-6-30 23:41
3535,你在哪

作者: Infrared    时间: 2008-7-1 01:58
提示: 作者被禁止或删除 内容自动屏蔽
作者: dbshy    时间: 2008-7-1 06:33
再次召唤3535,等着你的好方法{/hx}

不行的话,还是用我的废柴方法{/hx}

作者: dbshy    时间: 2008-7-2 20:53
召唤高手
作者: 分子轨道理论    时间: 2008-7-3 19:44
最后一次自顶.....
作者: 3535    时间: 2008-7-4 22:40
OK
  1. module Question
  2.   
  3.   NEWSCOPESKILLID = [1,2,3] # 用此效果的技能
  4.   
  5. end

  6. class Scene_Battle
  7.   #--------------------------------------------------------------------------
  8.   # ● 产生技能行动结果
  9.   #--------------------------------------------------------------------------
  10.   def make_skill_action_result
  11.     @skill = $data_skills[@active_battler.current_action.skill_id]
  12.     unless @active_battler.current_action.forcing
  13.       unless @active_battler.skill_can_use?(@skill.id)
  14.         $game_temp.forcing_battler = nil
  15.         @phase4_step = 1
  16.         return
  17.       end
  18.     end
  19.     @active_battler.sp -= @skill.sp_cost
  20.     @status_window.refresh
  21.     @help_window.set_text(@skill.name, 1)
  22.     @animation1_id = @skill.animation1_id
  23.     @animation2_id = @skill.animation2_id
  24.     @common_event_id = @skill.common_event_id
  25.     # 设定对像方战斗者
  26.     if Question::NEWSCOPESKILLID.include?(@skill.id)
  27.       set_target_battlers(8)
  28.     else
  29.       set_target_battlers(@skill.scope)
  30.     end
  31.     for target in @target_battlers
  32.       target.skill_effect(@active_battler, @skill)
  33.     end
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● 设定物品或技能目标方的战斗者
  37.   #     scope : 技能或者是物品的范围
  38.   #--------------------------------------------------------------------------
  39.   alias set_target set_target_battlers
  40.   def set_target_battlers(scope)
  41.     set_target(scope)
  42.     if @active_battler.is_a?(Game_Actor)
  43.       if scope == 8
  44.         for actor in @active_battler.current_action.target_index
  45.           @target_battlers.push($game_party.smooth_target_actor(actor))
  46.         end
  47.       end
  48.     end
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ● 更新画面 (角色命令回合 : 选择技能)
  52.   #--------------------------------------------------------------------------
  53.   def update_phase3_skill_select
  54.     @skill_window.visible = true
  55.     @skill_window.update
  56.     if Input.trigger?(Input::B)
  57.       $game_system.se_play($data_system.cancel_se)
  58.       end_skill_select
  59.       return
  60.     end
  61.     if Input.trigger?(Input::C)
  62.       @skill = @skill_window.skill
  63.       if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
  64.         $game_system.se_play($data_system.buzzer_se)
  65.         return
  66.       end
  67.       $game_system.se_play($data_system.decision_se)
  68.       @active_battler.current_action.skill_id = @skill.id
  69.       @skill_window.visible = false
  70.       if @skill.scope == 1
  71.         start_enemy_select
  72.         # 改
  73.       elsif @skill.scope == 3 or @skill.scope == 5 or Question::NEWSCOPESKILLID.include?(@skill.id)
  74.         start_actor_select
  75.       else
  76.         end_skill_select
  77.         phase3_next_actor
  78.       end
  79.       return
  80.     end
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 开始选择敌人
  84.   #--------------------------------------------------------------------------
  85.   alias start_actor start_actor_select
  86.   def start_actor_select(yes=false)
  87.     @yes = yes
  88.     start_actor
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ● 更新画面 (角色指令回合 : 选择角色)
  92.   #--------------------------------------------------------------------------
  93.   def update_phase3_actor_select
  94.     @actor_arrow.update
  95.     if Input.trigger?(Input::B)
  96.       $game_system.se_play($data_system.cancel_se)
  97.       end_actor_select
  98.       return
  99.     end
  100.     if Input.trigger?(Input::C)
  101.       $game_system.se_play($data_system.decision_se)
  102.       @active_battler.current_action.target_index = @actor_arrow.index
  103.       # 改
  104.       @skill = @skill_window.skill
  105.       if Question::NEWSCOPESKILLID.include?(@skill.id)
  106.         if @yes
  107.           @temptarget_index.push(@actor_arrow.index)
  108.           @active_battler.current_action.target_index = @temptarget_index
  109.         else
  110.           @temptarget_index = [@actor_arrow.index]
  111.           @actor_arrow.dispose
  112.           start_actor_select(true)
  113.           return
  114.         end
  115.       end
  116.       end_actor_select
  117.       if @skill_window != nil
  118.         end_skill_select
  119.       end
  120.       if @item_window != nil
  121.         end_item_select
  122.       end
  123.       phase3_next_actor
  124.     end
  125.   end
  126. end
复制代码
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: Infrared    时间: 2008-7-4 23:16
提示: 作者被禁止或删除 内容自动屏蔽
作者: dbshy    时间: 2008-7-5 00:24
扼,没达到我想要的效果,我还是用我的废柴方法 = =bb






欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1