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

Project1

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

[已经解决] !!紧急!!Sideview2.7敌人如何设定行走图?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
跳转到指定楼层
1
发表于 2013-5-25 15:40:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 黄濑凉太 于 2013-5-26 12:44 编辑

已经解决。好吧,我承认我自己粗心了。居然连保存都没有。。。怪不得不行。。
感谢289307768的提示。

坑的进度如上                                                                                                        点击↑

Lv1.梦旅人

梦石
0
星屑
50
在线时间
84 小时
注册时间
2013-4-5
帖子
152
2
发表于 2013-5-25 20:37:56 | 只看该作者
试试这个 你就知道 怎么回事了 【笑 ~

对了 记得改改图片名字 前边加 $ 这个符号

点评

啊啊啊啊。。真的没人了吗??  发表于 2013-5-25 21:22
能不能帮我弄个正确的增加需要敌人行走图的ID的脚本修改。。是sideview2.7约束汉化版本  发表于 2013-5-25 20:40
= =问题是这样他不会走路。。。  发表于 2013-5-25 20:39
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
3
 楼主| 发表于 2013-5-25 21:24:24 | 只看该作者
求求人帮忙啊。。。求人发正确设定敌人行走图的范例就行了。。。sideview2.7,网站:http://rpg.blue/forum.php?mod=viewthread&tid=103909

坑的进度如上                                                                                                        点击↑
回复 支持 反对

使用道具 举报

Lv1.梦旅人

彭格列I世

梦石
0
星屑
168
在线时间
566 小时
注册时间
2012-8-17
帖子
1614
4
发表于 2013-5-26 07:19:47 | 只看该作者
本帖最后由 小小刀886 于 2013-5-26 11:30 编辑

替换1128~1142(如果乃没有大幅度更改的话...)
  1.   #--------------------------------------------------------------------------
  2.   # ● エネミーアニメ
  3.   #--------------------------------------------------------------------------
  4.   # エネミーにアニメさせるか trueにするとアクターと同等の扱いになります。
  5.   # [設定方法]
  6.   # 1.エネミーのアニメ画像をキャラクターフォルダに用意
  7.   # 2.データベースのエネミーバトラーファイル名を、参照するキャラファイル名にする
  8.   def anime_on
  9.     case @enemy_id
  10.     when 1..20
  11.       return true
  12.     end
  13.     # 上記のエネミーID以外すべてに適用されるアニメ設定
  14.     return false
  15.   end
复制代码
@protosssonny  @黄濑凉太  


话说其实LZ目前还是别用横版比较好...先试试普通战斗...要不也可以试试小刀新坑的战斗:

战斗.zip (285.61 KB, 下载次数: 68)

点评

ali
小刀的好。。。只不过没用过  发表于 2013-5-26 09:58

赏金猎人 -- Bounty Hunter 预告贴(点击图片或者这里进入
交流群组:321810846

小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1398
在线时间
206 小时
注册时间
2013-2-3
帖子
629
5
发表于 2013-5-26 09:44:44 | 只看该作者
战斗图只要有一个人就好了,不必要行走图

是只要一个的 选定文件

效果图

我不一样的是用简易横版战斗
上线4人
  1. #==============================================================================
  2. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  3. #------------------------------------------------------------------------------
  4. module Battle_Formation
  5. #------------------------------------------------------------------------------
  6.   FORM = {
  7.     #    [角色1x.y]  [角色2x.y]  [角色3x.y]  [角色4x.y]
  8.     0 => [[437,200], [410, 230], [470, 170], [490, 250]]
  9.   }
  10. #------------------------------------------------------------------------------
  11. end

  12. #==============================================================================
  13. # ■ Game_System
  14. #==============================================================================
  15. class Game_System
  16.   attr_accessor :battle_formation                # Formation ID
  17.   #--------------------------------------------------------------------------
  18.   # ● 对象初始化
  19.   #--------------------------------------------------------------------------
  20.   alias init_game_system initialize
  21.   def initialize
  22.     init_game_system
  23.     @battle_formation = 0              # Initial formation
  24.   end
  25. end

  26. #==============================================================================
  27. # ■ Game_Actor
  28. #==============================================================================
  29. class Game_Actor < Game_Battler
  30.   #--------------------------------------------------------------------------
  31.   # ● Are sprites used? [Redefinition]
  32.   #--------------------------------------------------------------------------
  33.   def use_sprite?
  34.     return true
  35.   end
  36.   #--------------------------------------------------------------------------
  37.   # ● Battle Screen Acquiring X Coordinate
  38.   #--------------------------------------------------------------------------
  39.   def screen_x
  40.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
  41.   end
  42.   #--------------------------------------------------------------------------
  43.   # ● Battle Screen Acquiring Y Coordinate
  44.   #--------------------------------------------------------------------------
  45.   def screen_y
  46.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
  47.   end
  48.   #--------------------------------------------------------------------------
  49.   # ● Battle Screen Acquiring Z Coordinate
  50.   #--------------------------------------------------------------------------
  51.   def screen_z
  52.     bitmap = Cache.character(self.character_name)
  53.     return screen_y + bitmap.height / 4
  54.   end
  55. end



  56. #==============================================================================
  57. # ■ Game_Enemy
  58. #==============================================================================
  59. class Game_Enemy < Game_Battler
  60.   #--------------------------------------------------------------------------
  61.   # ● Battle Screen Acquiring Z Coordinate  [Redefinition]
  62.   #--------------------------------------------------------------------------
  63.   def screen_z
  64.     bitmap = Cache.battler(self.battler_name, self.battler_hue)
  65.     return screen_y + bitmap.height
  66.   end
  67. end

  68. #==============================================================================
  69. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  70. #------------------------------------------------------------------------------
  71. # ■ Scene_Battle
  72. #==============================================================================
  73. class Scene_Battle < Scene_Base
  74.   #--------------------------------------------------------------------------
  75.   # ●  Battle Start Process
  76.   #--------------------------------------------------------------------------
  77.   alias process_battle_start_sideview process_battle_start
  78.   def process_battle_start
  79.     for battler in ($game_party.members + $game_troop.members)
  80.       battler.move_mode = SideView::M_MODE_WAIT
  81.     end
  82.     process_battle_start_sideview
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● Victory Process
  86.   #--------------------------------------------------------------------------
  87.   alias process_victory_sideview process_victory
  88.   def process_victory
  89.     for actor in $game_party.members
  90.       actor.move_mode = SideView::M_MODE_WIN
  91.     end
  92.     process_victory_sideview
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # ● Wait Until Motion Control Is Finished
  96.   #--------------------------------------------------------------------------
  97.   def wait_for_motion
  98.     while @active_battler.motion_stop
  99.       update_basic
  100.     end
  101.   end
  102.   #--------------------------------------------------------------------------
  103.   # ● Execute Combat Operations: Attack [Redefinition]
  104.   #--------------------------------------------------------------------------
  105.   def execute_action_attack
  106.     text = sprintf(Vocab::DoAttack, @active_battler.name)
  107.     @message_window.add_instant_text(text)
  108.     targets = @active_battler.action.make_targets
  109.     #---Enemy attack sound reproduced.
  110.     if @active_battler.is_a?(Game_Enemy)
  111.       Sound.play_enemy_attack
  112.       wait(15, true)
  113.     end
  114.     #--- Proximity (Going)
  115.     SideView.set_target_point(@active_battler, targets[0])
  116.     @active_battler.move_mode = SideView::M_MODE_ATK1
  117.     @active_battler.motion_stop = true
  118.     wait_for_motion
  119.     #--- Attack
  120.     wait(5)
  121.     @active_battler.move_mode = SideView::M_MODE_ATK2
  122.     #---
  123.     display_attack_animation(targets)
  124.     wait(20)
  125.     for target in targets
  126.       target.attack_effect(@active_battler)
  127.       display_action_effects(target)
  128.     end
  129.     #--- Proximity (Return)
  130.     @active_battler.move_mode = SideView::M_MODE_ATK3
  131.     @active_battler.motion_stop = true
  132.     wait_for_motion
  133.     #---Wait
  134.     for target in targets
  135.       target.move_mode = SideView::M_MODE_WAIT
  136.     end
  137.     @active_battler.move_mode = SideView::M_MODE_WAIT
  138.     #---
  139.   end
  140.   #--------------------------------------------------------------------------
  141.   # ● Execute Combat Operations: Skill [Redefinition]
  142.   #--------------------------------------------------------------------------
  143.   def execute_action_skill
  144.     skill = @active_battler.action.skill
  145.     text = @active_battler.name + skill.message1
  146.     @message_window.add_instant_text(text)
  147.     unless skill.message2.empty?
  148.       wait(10)
  149.       @message_window.add_instant_text(skill.message2)
  150.     end
  151.     #--- Enemy attack sound reproduced.
  152.     if @active_battler.is_a?(Game_Enemy)
  153.       Sound.play_enemy_attack
  154.       wait(15, true)
  155.     end
  156.     #--- Long distance attack.
  157.     @active_battler.move_mode = SideView::M_MODE_MAGI
  158.     #---
  159.     targets = @active_battler.action.make_targets
  160.     display_animation(targets, skill.animation_id)
  161.     @active_battler.mp -= @active_battler.calc_mp_cost(skill)
  162.     $game_temp.common_event_id = skill.common_event_id
  163.     for target in targets
  164.       target.skill_effect(@active_battler, skill)
  165.       display_action_effects(target, skill)
  166.     end
  167.     #---Wait
  168.     for target in targets
  169.       target.move_mode = SideView::M_MODE_WAIT
  170.     end
  171.     @active_battler.move_mode = SideView::M_MODE_WAIT
  172.     #---
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # Execute Combat Operations: Item [Redefinition]
  176.   #--------------------------------------------------------------------------
  177.   def execute_action_item
  178.     item = @active_battler.action.item
  179.     text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
  180.     @message_window.add_instant_text(text)
  181.     #--- Enemy attack sound reproduced.
  182.     if @active_battler.is_a?(Game_Enemy)
  183.       Sound.play_enemy_attack
  184.       wait(15, true)
  185.     end
  186.     #--- Long distance attack
  187.     @active_battler.move_mode = SideView::M_MODE_MAGI
  188.     #---
  189.     targets = @active_battler.action.make_targets
  190.     display_animation(targets, item.animation_id)
  191.     $game_party.consume_item(item)
  192.     $game_temp.common_event_id = item.common_event_id
  193.     for target in targets
  194.       target.item_effect(@active_battler, item)
  195.       display_action_effects(target, item)
  196.     end
  197.     #---Wait
  198.     for target in targets
  199.       target.move_mode = SideView::M_MODE_WAIT
  200.     end
  201.     @active_battler.move_mode = SideView::M_MODE_WAIT
  202.     #---
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● Attack Animation Display [Redefinition]
  206.   #     Targets : Object's Arrangement
  207.   #--------------------------------------------------------------------------
  208.   # 【Changed part】
  209.   #  Enemy sound effect is changed so it can be used in each phase of operation.
  210.   #  It changes so that the attack animation of an enemy can be displayed.
  211.   #--------------------------------------------------------------------------
  212.   def display_attack_animation(targets)
  213.     display_normal_animation(targets, @active_battler.atk_animation_id, false)
  214.     display_normal_animation(targets, @active_battler.atk_animation_id2, true)
  215.     wait_for_animation
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● HP Damage display [Redefinition]
  219.   #    Target : Candidate
  220.   #    object : Skill or item
  221.   #--------------------------------------------------------------------------
  222.   def display_hp_damage(target, obj = nil)
  223.     if target.hp_damage == 0                # No damage
  224.       return if obj != nil and obj.damage_to_mp
  225.       return if obj != nil and obj.base_damage == 0
  226.       fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
  227.       text = sprintf(fmt, target.name)
  228.     elsif target.absorbed                   # Absorption
  229.       fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
  230.       text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
  231.     elsif target.hp_damage > 0              # Damage
  232.       if target.actor?
  233.         text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
  234.         Sound.play_actor_damage
  235.         $game_troop.screen.start_shake(5, 5, 10)
  236.         target.blink = true # Only adds here
  237.       else
  238.         text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
  239.         Sound.play_enemy_damage
  240.         target.blink = true
  241.       end
  242.     else                                    # Recovery
  243.       fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
  244.       text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
  245.       Sound.play_recovery
  246.     end
  247.     @message_window.add_instant_text(text)
  248.     wait(30)
  249.   end
  250. end

  251. #==============================================================================
  252. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  253. #==============================================================================
  254. module SideView
  255. #----------------------------------------------------------------------------
  256.   #-----[操作设定]-----
  257.   # 操作速度
  258.   MOTION_SPEED = 15

  259.   #-----[动画设置]-----
  260.   # 通常敌人攻击动画设定。
  261.   E_ANIME = {
  262.     1 => [1, 0]
  263.   }

  264. #----------------------------------------------------------------------------
  265. #----------------------------------------------------------------------------
  266.   # 行动控制方式
  267.   M_MODE_WAIT = 0     # Standby
  268.   M_MODE_MAGI = 1     # Attack
  269.   M_MODE_DAMG = 2     # Non-Damage Attack
  270.   M_MODE_WIN  = 3     # Victory
  271.   M_MODE_ATK1 = 4     # Direct Attack (Approaching)
  272.   M_MODE_ATK2 = 5     # Direct Attack (Attacking)
  273.   M_MODE_ATK3 = 6     # Direct Attack (Returning)

  274.   module_function
  275.   #--------------------------------------------------------------------------
  276.   # ● Movement-Zone Calculation
  277.   #--------------------------------------------------------------------------
  278.   def set_target_point(attacker, target)
  279.     case target
  280.     when Game_Actor
  281.       bits = Cache.character(target.character_name)
  282.       attacker.target_x = target.screen_x + (bits.width / 8)
  283.       attacker.target_y = target.screen_y
  284.     when Game_Enemy
  285.       bits = Cache.battler(target.battler_name, target.battler_hue)
  286.       attacker.target_x = target.screen_x + (bits.width / 2)
  287.       attacker.target_y = target.screen_y
  288.     end
  289.   end
  290. end

  291. class Game_Battler
  292.   attr_accessor   :move_mode       # Operation Mode
  293.   # 0:Standby   1:Attack   2: Un-useless   3:Victory
  294.   attr_accessor   :motion_stop     # Operation Stop Flag (Under Movement Flag)
  295.   attr_accessor   :target_x        # Move Position(x)
  296.   attr_accessor   :target_y        # Move Position(y)
  297.   #--------------------------------------------------------------------------
  298.   # ● Object Initialization
  299.   #--------------------------------------------------------------------------
  300.   alias initialize_sdva_corpse initialize
  301.   def initialize
  302.     initialize_sdva_corpse
  303.     @move_mode = 0
  304.     @motion_stop = false
  305.     @target_x = 0
  306.     @target_y = 0
  307.   end
  308. end

  309. #==============================================================================
  310. # ■ Game_Enemy
  311. #==============================================================================
  312. class Game_Enemy < Game_Battler
  313.   #--------------------------------------------------------------------------
  314.   # ● Attack Animation ID Acquisition
  315.   #--------------------------------------------------------------------------
  316.   def atk_animation_id
  317.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  318.     return SideView::E_ANIME[@enemy_id][0]
  319.   end
  320.   #--------------------------------------------------------------------------
  321.   # ● Attack Animation ID Acquisition  (2 Sword Style : 2 Weapons )
  322.   #--------------------------------------------------------------------------
  323.   def atk_animation_id2
  324.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  325.     return SideView::E_ANIME[@enemy_id][1]
  326.   end
  327. end



  328. #==============================================================================
  329. # ■ Sprite_Battler
  330. #==============================================================================
  331. class Sprite_Battler < Sprite_Base
  332.   #--------------------------------------------------------------------------
  333. # ● Object Initialization
  334. #     Viewport : View Port
  335. #     Battler  : Battler (Game_Battler)
  336.   #--------------------------------------------------------------------------
  337.   alias initialize_sideview initialize
  338.   def initialize(viewport, battler = nil)
  339.     initialize_sideview(viewport, battler)
  340.     init_direct_attack
  341.   end
  342.   #--------------------------------------------------------------------------
  343.   # ● Set Proximity Value For Attack
  344.   #--------------------------------------------------------------------------
  345.   def init_direct_attack
  346.     @direct_attack_cnt = 0
  347.     @direct_attack_phase = 0
  348.     @direct_move_cnt = 0
  349.     @battler_x_plus = 0
  350.     @battler_y_plus = 0
  351.     @moving_mode = 0
  352.     @pattern = 0
  353.     @direction = 0
  354.   end
  355.   #--------------------------------------------------------------------------
  356.   # ● Frame Renewal [Redefinition]
  357.   #--------------------------------------------------------------------------
  358.   def update
  359.     super
  360.     if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
  361.       self.bitmap = nil
  362.     else
  363.       @use_sprite = @battler.use_sprite?
  364.       if @use_sprite
  365.         self.x = @battler.screen_x + @battler_x_plus
  366.         self.y = @battler.screen_y + @battler_y_plus
  367.         self.z = @battler.screen_z
  368.         update_battler_bitmap
  369.       end
  370.       setup_new_effect
  371.       update_effect
  372.     end
  373.   end
  374.   #--------------------------------------------------------------------------
  375.   # ● Bitmap Transfer Source Renewal
  376.   #--------------------------------------------------------------------------
  377.   alias update_battler_bitmap_sideview update_battler_bitmap
  378.   def update_battler_bitmap
  379.     case @battler
  380.     when Game_Actor
  381.       if @battler.character_name != @battler_name or @battler.character_index != @battler_hue
  382.         @battler_name = @battler.character_name
  383.         @battler_hue = @battler.character_index
  384.         draw_pre_character
  385.         draw_character
  386.         if (@battler.dead? or @battler.hidden)
  387.           self.opacity = 0
  388.         end
  389.       end
  390.     when Game_Enemy
  391.       if @battler.battler_name != @battler_name or
  392.          @battler.battler_hue != @battler_hue
  393.         @battler_name = @battler.battler_name
  394.         @battler_hue = @battler.battler_hue
  395.         draw_battler
  396.         if (@battler.dead? or @battler.hidden)
  397.           self.opacity = 0
  398.         end
  399.       end
  400.     end
  401.     motion_control
  402.   end
  403.   #--------------------------------------------------------------------------
  404.   # ● Battler Drawing
  405.   #--------------------------------------------------------------------------
  406.   def draw_battler
  407.     self.bitmap = Cache.battler(@battler_name, @battler_hue)
  408.     @width = bitmap.width
  409.     [url=home.php?mod=space&uid=291977]@height[/url] = bitmap.height
  410.     self.ox = @width / 2
  411.     self.oy = @height
  412.   end
  413.   #--------------------------------------------------------------------------
  414.   # ● Pre-Character Drawing [Common]
  415.   #--------------------------------------------------------------------------
  416.   def draw_pre_character
  417.     self.bitmap = Cache.character(@battler_name)
  418.     sign = @battler_name[/^[\!\$]./]
  419.     if sign != nil and sign.include?('$')
  420.       @width = bitmap.width / 3
  421.       @height = bitmap.height / 4
  422.     else
  423.       @width = bitmap.width / 12
  424.       @height = bitmap.height / 8
  425.     end
  426.     self.ox = @width / 2
  427.     self.oy = @height
  428.   end
  429.   #--------------------------------------------------------------------------
  430.   # ● Character Drawing [Common]
  431.   #--------------------------------------------------------------------------
  432.   def draw_character
  433.     index = @battler_hue
  434.     pattern = @pattern < 3 ? @pattern : 1
  435.     sx = (index % 4 * 3 + pattern) * @width
  436.     sy = (index / 4 * 4 + (@direction - 2) / 2) * @height
  437.     self.src_rect.set(sx, sy, @width, @height)
  438.   end
  439.   #--------------------------------------------------------------------------
  440.   # ● Motion Control
  441.   #--------------------------------------------------------------------------
  442.   def motion_control
  443.     # Memory Operation Mode
  444.     @moving_mode = @battler.move_mode
  445.     # Battler Drawing
  446.     case @battler
  447.     when Game_Actor # Actor
  448.       actor_motion_control
  449.     when Game_Enemy # Enemy
  450.       enemy_motion_control
  451.     end
  452.   end
  453.   #--------------------------------------------------------------------------
  454.   # ● Motion Control (Actor)
  455.   #--------------------------------------------------------------------------
  456.   def actor_motion_control
  457.     # Operation Change
  458.     case @moving_mode
  459.     when SideView::M_MODE_WAIT  # Standby
  460.       init_direct_attack
  461.       @battler_x_plus = 0
  462.       @direction = 4
  463.       @pattern = 1
  464.     when SideView::M_MODE_MAGI  # Attack
  465.       @battler_x_plus = -10
  466.       @direction = 4
  467.       @pattern = 3
  468.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  469.       @battler_x_plus = 10
  470.       @direction = 4
  471.       @pattern = 3
  472.     when SideView::M_MODE_WIN  # Victory
  473.       @direction = 2
  474.       @pattern = 1
  475.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  476.       exe_moving_attack_start
  477.       @end_pos_x = @battler_x_plus
  478.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  479.       @battler_x_plus = @end_pos_x - 10
  480.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  481.       exe_moving_attack_end
  482.     else
  483.       p "error:Sprite_Battler>> @moving_mode"
  484.     end
  485.     draw_character
  486.   end
  487.   #--------------------------------------------------------------------------
  488.   # ● Motion Control (Enemy)
  489.   #--------------------------------------------------------------------------
  490.   def enemy_motion_control
  491.     # Operation Change
  492.     case @moving_mode
  493.     when SideView::M_MODE_WAIT  # Standby
  494.       init_direct_attack
  495.     when SideView::M_MODE_MAGI  # Attack
  496.       @battler_x_plus = 10
  497.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  498.       @battler_x_plus = -10
  499.       @shake_flg = true
  500.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  501.       exe_moving_attack_start
  502.       @end_pos_x = @battler_x_plus
  503.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  504.       @battler_x_plus = @end_pos_x + 10
  505.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  506.       exe_moving_attack_end
  507.     else
  508.       p "error:Sprite_Battler>> @moving_mode", @moving_mode
  509.     end
  510.   end
  511.   #--------------------------------------------------------------------------
  512.   # ● Proximity Attack Execution Method
  513.   #--------------------------------------------------------------------------
  514.   def exe_moving_attack_start
  515.     return unless @battler.motion_stop
  516.     case @direct_attack_phase
  517.     when 0  # Start Operation Preparation
  518.       diratk_start
  519.     when 1  # Move Operation (Going)
  520.       diratk_move
  521.     when 2  # After-Movement Wait
  522.       diratk_wait
  523.     end
  524.   end
  525.   def exe_moving_attack_end
  526.     case @direct_attack_phase
  527.     when 0  # Attack Operation
  528.       diratk_attack
  529.     when 1  # Move Operation (Return)
  530.       diratk_back
  531.     when 2  # Operation End
  532.       diratk_end
  533.     end
  534.   end
  535.   #--------------------------------------------------------------------------
  536.   # ● Proximity Attack Execution [Start Operation Preparation]
  537.   #--------------------------------------------------------------------------
  538.   def diratk_start
  539.     # Pose Change
  540.     @pattern = 1
  541.     # The number of frames needed is the distance between current position and
  542.     # target position.
  543.     pos_x = @battler.target_x - self.x
  544.     pos_y = @battler.target_y - self.y
  545.     # Caculation for ammount of frames needed.
  546.     @direct_move_cnt = @direct_attack_cnt = (pos_x.abs / SideView::MOTION_SPEED).round
  547.     # NEXT Phase
  548.     @direct_attack_phase += 1
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ● Proximity Attack Execution [Move Operation (Going)]
  552.   #--------------------------------------------------------------------------
  553.   def diratk_move
  554.     case @battler
  555.     when Game_Actor
  556.       x_plus = @width
  557.       y_plus = -@height / 4
  558.     when Game_Enemy
  559.       x_plus = -@width - 10
  560.       y_plus = @height / 4
  561.     end
  562.     # The next movement location is figured out by the distance between
  563.     # current position and target position.
  564.     pos_x = @battler.target_x - self.x + x_plus
  565.     pos_y = @battler.target_y - self.y + y_plus
  566.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  567.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  568.     # End count
  569.     @direct_attack_cnt -= 1
  570.     # Last movement (Insurance: Last correction)
  571.     if @direct_attack_cnt <= 0
  572.       @battler_x_plus = @battler.target_x - @battler.screen_x + x_plus
  573.       @battler_y_plus = @battler.target_y - @battler.screen_y + y_plus
  574.       # NEXTフェーズ
  575.       @direct_attack_cnt = 5
  576.       @direct_attack_phase += 1
  577.     end
  578.   end
  579.   #--------------------------------------------------------------------------
  580.   # ● Proximity Attack Execution [Attack Operation Return]
  581.   #--------------------------------------------------------------------------
  582.   def diratk_wait
  583.     # End Count
  584.     @direct_attack_cnt -= 1
  585.     # Last Movement
  586.     if @direct_attack_cnt <= 0
  587.       # Pose Change
  588.       @pattern = 3
  589.       # END Phase
  590.       @direct_attack_phase = 0
  591.       @battler.motion_stop = false
  592.     end
  593.   end
  594.   #--------------------------------------------------------------------------
  595.   # ● Proximity Attack Execution [Attack Operation Return]
  596.   #--------------------------------------------------------------------------
  597.   def diratk_attack
  598.     # Pose Change
  599.     @pattern = 1
  600.     # End Wait Count
  601.     @direct_attack_cnt = @direct_move_cnt
  602.     # NEXT Phase
  603.     @direct_attack_phase += 1
  604.   end
  605.   #--------------------------------------------------------------------------
  606.   # ● Proximity Attack Execution [Move Operation (Return)]
  607.   #--------------------------------------------------------------------------
  608.   def diratk_back
  609.     # The next movement location is figured out by the distance between
  610.     # current position and target position.
  611.     pos_x = @battler.screen_x - self.x
  612.     pos_y = @battler.screen_y - self.y
  613.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  614.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  615.     # End Count
  616.     @direct_attack_cnt -= 1
  617.     # Last Movement
  618.     if @direct_attack_cnt == 0
  619.       @battler_x_plus = 0
  620.       @battler_y_plus = 0
  621.       # NEXT Phase
  622.       @direct_attack_phase += 1
  623.     end
  624.   end
  625.   #--------------------------------------------------------------------------
  626.   # ● Proximity attack execution [Operation End]
  627.   #--------------------------------------------------------------------------
  628.   def diratk_end
  629.     init_direct_attack
  630.     @battler.motion_stop = false
  631.     # END Phase
  632.     @direct_attack_phase = 0
  633.   end
  634. end
复制代码

点评

问题是我需要行走图的效果= =。。。  发表于 2013-5-26 09:50
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1398
在线时间
206 小时
注册时间
2013-2-3
帖子
629
6
发表于 2013-5-26 09:55:57 | 只看该作者
@黄濑凉太
你是要可以行走战斗的吗?像少侠一炷香的吗(笑)这个简易战斗脚本和你那个战斗的脚本一样,会行走的,脚本已经设计好了的

飞机思汗

点评

不,意思是敌人也能使用行走图的正确设定方法。【意思是敌人也有和主角一样的动态行走效果】  发表于 2013-5-26 09:59
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1398
在线时间
206 小时
注册时间
2013-2-3
帖子
629
7
发表于 2013-5-26 10:08:24 | 只看该作者
@黄濑凉太
是敌人也有行走的图是吗,行走这个在脚本里也设计好了,只要放一个图就是了

点评

默默地问一下,在哪一行设定。。  发表于 2013-5-26 10:13
为什么现在好像每个人都不能@了。。  发表于 2013-5-26 10:12
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1398
在线时间
206 小时
注册时间
2013-2-3
帖子
629
8
发表于 2013-5-26 10:17:21 | 只看该作者
@黄濑凉太 不用设定,看看5楼,只要丢个单人图就可以料,或者也可看小刀886的赏金猎人(没加密)的

点评

请不要连帖啊。善用点评。  发表于 2013-5-26 10:55
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
51
在线时间
121 小时
注册时间
2012-3-4
帖子
84
9
发表于 2013-5-26 11:51:50 | 只看该作者
本帖最后由 289307768 于 2013-7-18 09:08 编辑

走在迷途中的羔羊啊——让我拯救你吧!!!



从1140行开始看起:
  1. #--------------------------------------------------------------------------
  2.   # ● 敌方动画
  3.   #--------------------------------------------------------------------------
  4.   # 敌方被作成动画? true是是跟主人公同等对待。
  5.   # [设定方法]
  6.   # 1.敌方的动画画像变成行走图
  7.   # 2.数据库的敌方角色名、参照着行走图文件名填写
  8.   def anime_on
  9.     case @enemy_id
  10.     when 1
  11.       return true
  12.     end
  13.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动画设定
  14.     return false
  15.   end
  16.    # ● 敌方动画時的自动反转
  17.   #--------------------------------------------------------------------------
  18.   # 如果想自动反转上面设定为NO的敌方画像和武器动画时为true
  19.   def action_mirror
  20.     case @enemy_id
  21.     when 1
  22.       return true
  23.     end
  24.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动画设定
  25.     return false
  26.   end
复制代码
[/code]end
module RPG[/code]

看到其中的
  1. # 1.敌方的动画画像变成行走图
  2.   # 2.数据库的敌方角色名、参照着行走图文件名填写
  3.   def anime_on
  4.     case @enemy_id
  5.     when 1
  6.       return true
  7.     end
  8.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动画设定
复制代码
若是想要增加一个想范例中:$部下 一样的敌人。就将数据库里2(想几号就几号,不过要与下面when的数字同步。)号敌人的战斗图改成怪物行走图。然后进入数据库。
  1. when 1
  2.       return true
复制代码
下方添加:
  1. when 2
  2.       return true
复制代码
之后进入测试。(如果是直接进入数据库测试,一定要保存工程,否则无效!)


你会发现!!!
敌人背对着你!!!
这时我们就要这样!
打开脚本编辑器:
  1. #--------------------------------------------------------------------------
  2.   # ● 敌方动画時的自动反转
  3.   #--------------------------------------------------------------------------
  4.   # 如果想自动反转上面设定为NO的敌方画像和武器动画时为true
  5.   def action_mirror
  6.     case @enemy_id
  7.     when 1
  8.       return true
  9.     end
  10.     # 上述敌方ID以外的其他敌[size=5][color=Red][/color][/size]方队员全部使用的武器ID动画设定
  11.     return false
  12.   end
  13. #看到这里!!!
复制代码
#--------------------------------------------------------------------------
也同样的添加一个:
  1. when 2
  2.     return true
复制代码
便大功告成了!!


记住一定要保存!!

好盆友不要谢,给我点经验就可以啦。。。我想要签名档。。。

点评

你真是我的福音。。。谢谢你那温馨的提醒:记住一定要保存!! 感谢啊啊啊!!可惜我不能给糖。。  发表于 2013-5-26 12:09
再说你这种错误应当是脚本被修改得不成摸样了。新建一个横版战斗试试  发表于 2013-5-26 12:00
能给个范例吗?我不知道为什么试了也不行。。  发表于 2013-5-26 11:58
说明一下 敌人数据库里的编号是多少,打比方说是87,你就写when 87  发表于 2013-5-26 11:55
第一次写这么长的文章,中间有一些错字,体谅一下。  发表于 2013-5-26 11:54

评分

参与人数 1梦石 +1 收起 理由
怪蜀黍 + 1 辛苦了

查看全部评分


无语问苍天......
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
10
 楼主| 发表于 2013-5-26 12:07:16 | 只看该作者
289307768 发表于 2013-5-26 11:51
走在迷途中的羔羊啊——让我拯救你吧!!!



不,我终于知道我折磨了一整个晚上都搞不定的原因是:
我忘记了保存啊啊啊啊!!!!!

点评

祝你好运。。。。。。。。。。  发表于 2013-5-26 12:12

坑的进度如上                                                                                                        点击↑
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-28 21:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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