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

Project1

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

[已经解决] 如何才能改成战斗时选择敌人的图像,而不是选择名字呢

[复制链接]

Lv6.析梦学徒

梦石
0
星屑
51796
在线时间
269 小时
注册时间
2010-6-16
帖子
982
跳转到指定楼层
1
发表于 2015-3-13 22:57:35 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x


如图,默认选择的是“史莱姆A”,
如果想要改成选择本体的话该怎么做呢……?脚本小白,求详细一些
◇◆舒克君赛高◆◇

Lv3.寻梦者

梦石
0
星屑
3228
在线时间
1120 小时
注册时间
2009-4-15
帖子
815
2
发表于 2015-3-13 23:09:00 | 只看该作者
请使用MOG的MOG - Battle Cursor这个脚本

点评

lz要的是改變敌人图像,而不是加个指标  发表于 2015-3-13 23:52
回复 支持 反对

使用道具 举报

Lv6.析梦学徒

梦石
0
星屑
51796
在线时间
269 小时
注册时间
2010-6-16
帖子
982
3
 楼主| 发表于 2015-3-13 23:32:25 | 只看该作者
tan12345 发表于 2015-3-13 23:09
请使用MOG的MOG - Battle Cursor这个脚本

论坛里搜索了一下没找到,在百度找到28M的一个包,不知道是不是…如果可以的话请贴上来一下??
◇◆舒克君赛高◆◇
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1239
在线时间
668 小时
注册时间
2009-11-11
帖子
2787
4
发表于 2015-3-14 03:01:24 | 只看该作者
LZ号被盗了?提问?

嘿。嘿。嘿
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3228
在线时间
1120 小时
注册时间
2009-4-15
帖子
815
5
发表于 2015-3-14 10:38:23 | 只看该作者
纸飞机哟 发表于 2015-3-13 23:32
论坛里搜索了一下没找到,在百度找到28M的一个包,不知道是不是…如果可以的话请贴上来一下?? ...

RUBY 代码复制
  1. #==============================================================================
  2. # +++ MOG - Battle Cursor (1.0) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # [url]http://www.atelier-rgss.com/[/url]
  6. #==============================================================================
  7. # Sistema de cursor animado de batalha nos sprites dos battlers.
  8. #==============================================================================
  9. # Arquivo necessário. (Graphics/System)
  10. #
  11. # Battle_Cursor.png
  12. #
  13. #==============================================================================
  14.  
  15. #==============================================================================
  16. # ■ CURSOR SETTING
  17. #==============================================================================
  18. module MOG_BATTLE_CURSOR
  19.   #Definição da posição do cursor em relação ao alvo.
  20.   CURSOR_POSITION = [-45, -16]
  21.   #Definição da posição do nome do alvo.
  22.   CURSOR_NAME_POSITION = [-10, 35]
  23.   #Ativar efeito deslizar.
  24.   CURSOR_SLIDE_EFFECT = true
  25.   #Ativar animação de levitação.
  26.   CURSOR_FLOAT_EFFECT = true
  27.   #Definição da prioridade do cursor.
  28.   CURSOR_Z = 0
  29. end
  30.  
  31. #==============================================================================
  32. # ■ Game Temp
  33. #==============================================================================
  34. class Game_Temp
  35.  
  36.   attr_accessor :battle_cursor
  37.  
  38.   #--------------------------------------------------------------------------
  39.   # ● Initialize
  40.   #--------------------------------------------------------------------------  
  41.   alias mog_battle_cursor_initialize initialize
  42.   def initialize
  43.       @battle_cursor = [0,0,false,""]
  44.       mog_battle_cursor_initialize
  45.   end  
  46.  
  47. end
  48.  
  49. #==============================================================================
  50. # ■ Spriteset Battle Cursor
  51. #==============================================================================
  52. class Sprite_Battle_Cursor < Sprite
  53.   include MOG_BATTLE_CURSOR
  54.  
  55.   #--------------------------------------------------------------------------
  56.   # ● Initialize
  57.   #--------------------------------------------------------------------------        
  58.   def initialize(viewport = nil)
  59.       super(viewport)
  60.       $game_temp.battle_cursor = [0,0,false,""]
  61.       self.bitmap = Cache.system("Battle_Cursor")
  62.       self.visible = $game_temp.battle_cursor[2]
  63.       self.z = CURSOR_Z
  64.       self.z = 10 if $mog_rgss3_battle_hud != nil
  65.       @cursor_name = Sprite.new
  66.       @cursor_name.bitmap = Bitmap.new(120,32)
  67.       @cursor_name.z = self.z + 1
  68.       @cursor_name.bitmap.font.size = 16
  69.       @cursor_name_enemy = $game_temp.battle_cursor[3]
  70.       @cursor_name_position = [CURSOR_NAME_POSITION[0] ,CURSOR_NAME_POSITION[1]]
  71.       @cursor_float = [0,0]
  72.       refresh_cursor_name
  73.   end
  74.  
  75.   #--------------------------------------------------------------------------
  76.   # ● Dispose Sprite
  77.   #--------------------------------------------------------------------------         
  78.   def dispose
  79.       super
  80.       dispose_sprite_cursor
  81.   end
  82.  
  83.   #--------------------------------------------------------------------------
  84.   # ● Dispose Sprite Cursor
  85.   #--------------------------------------------------------------------------            
  86.   def dispose_sprite_cursor
  87.       if @cursor_name != nil
  88.          @cursor_name.bitmap.dispose
  89.          @cursor_name.dispose
  90.       end
  91.       self.bitmap.dispose
  92.   end
  93.  
  94.   #--------------------------------------------------------------------------
  95.   # ● Refresh Cursor Name
  96.   #--------------------------------------------------------------------------              
  97.   def refresh_cursor_name
  98.       @cursor_name_enemy = $game_temp.battle_cursor[3]
  99.       @cursor_name.bitmap.clear
  100.       @cursor_name.bitmap.draw_text(0,0,120,32,@cursor_name_enemy.to_s,1)
  101.   end
  102.  
  103.   #--------------------------------------------------------------------------
  104.   # ● Update
  105.   #--------------------------------------------------------------------------            
  106.   def update
  107.       super
  108.       update_sprite_cursor
  109.   end
  110.  
  111.   #--------------------------------------------------------------------------
  112.   # ● Update Sprite Cursor
  113.   #--------------------------------------------------------------------------              
  114.   def update_sprite_cursor
  115.       update_visible
  116.       update_cursor_float_effect
  117.       execute_move(0,self.x,$game_temp.battle_cursor[0])
  118.       execute_move(1,self.y,$game_temp.battle_cursor[1] + @cursor_float[1])
  119.       update_sprite_name
  120.   end
  121.  
  122.   #--------------------------------------------------------------------------
  123.   # ● Update Visible
  124.   #--------------------------------------------------------------------------               
  125.   def update_visible
  126.       self.visible = $game_temp.battle_cursor[2]
  127.       if !self.visible
  128.          self.x = -64
  129.          self.y = -64
  130.       end  
  131.   end  
  132.  
  133.   #--------------------------------------------------------------------------
  134.   # ● Update Sprite Name
  135.   #--------------------------------------------------------------------------               
  136.   def update_sprite_name
  137.       return if @cursor_name == nil
  138.       refresh_cursor_name  if @cursor_name_enemy != $game_temp.battle_cursor[3]
  139.       @cursor_name.x = self.x + @cursor_name_position[0]
  140.       @cursor_name.y = self.y + @cursor_name_position[1]
  141.       @cursor_name.opacity = self.opacity
  142.       @cursor_name.visible = self.visible
  143.   end  
  144.  
  145.   #--------------------------------------------------------------------------
  146.   # ● Update Cursor Float Effect
  147.   #--------------------------------------------------------------------------              
  148.   def update_cursor_float_effect
  149.       return if !CURSOR_FLOAT_EFFECT
  150.       @cursor_float[0] += 1
  151.       case @cursor_float[0]
  152.         when 0..20
  153.           @cursor_float[1] += 1
  154.         when 21..40
  155.           @cursor_float[1]  -= 1
  156.         else
  157.           @cursor_float[0] = 0
  158.           @cursor_float[1] = 0
  159.       end        
  160.   end  
  161.  
  162.   #--------------------------------------------------------------------------
  163.   # ● Execute Move
  164.   #--------------------------------------------------------------------------      
  165.   def execute_move(type,cp,np)
  166.       sp = 5 + ((cp - np).abs / 5)
  167.       if cp > np
  168.          cp -= sp
  169.          cp = np if cp < np
  170.       elsif cp < np
  171.          cp += sp
  172.          cp = np if cp > np
  173.       end     
  174.       self.x = cp if type == 0
  175.       self.y = cp if type == 1
  176.   end      
  177.  
  178. end
  179.  
  180. #==============================================================================
  181. # ■ Spriteset Battle
  182. #==============================================================================
  183. class Spriteset_Battle
  184.  
  185.   #--------------------------------------------------------------------------
  186.   # ● Initialize
  187.   #--------------------------------------------------------------------------      
  188.   alias mog_battle_cursor_initialize initialize
  189.   def initialize
  190.       mog_battle_cursor_initialize
  191.       create_cursor
  192.   end
  193.  
  194.   #--------------------------------------------------------------------------
  195.   # ● Dispose
  196.   #--------------------------------------------------------------------------      
  197.   alias mog_battle_cursor_dispose dispose
  198.   def dispose
  199.       mog_battle_cursor_dispose
  200.       dispose_cursor
  201.   end
  202.  
  203.   #--------------------------------------------------------------------------
  204.   # ● Update
  205.   #--------------------------------------------------------------------------         
  206.   alias mog_battle_cursor_update update
  207.   def update
  208.       mog_battle_cursor_update
  209.       update_battle_cursor
  210.   end  
  211.  
  212.   #--------------------------------------------------------------------------
  213.   # ● Create_Cursor
  214.   #--------------------------------------------------------------------------        
  215.   def create_cursor
  216.       return if @battle_cursor != nil
  217.       @battle_cursor = Sprite_Battle_Cursor.new      
  218.   end
  219.  
  220.   #--------------------------------------------------------------------------
  221.   # ● Dispose Cursor
  222.   #--------------------------------------------------------------------------        
  223.   def dispose_cursor
  224.       return if @battle_cursor == nil
  225.       @battle_cursor.dispose
  226.   end  
  227.  
  228.   #--------------------------------------------------------------------------
  229.   # ● Update Battle Cursor
  230.   #--------------------------------------------------------------------------         
  231.   def update_battle_cursor
  232.       return if @battle_cursor == nil
  233.       @battle_cursor.update      
  234.   end
  235.  
  236. end
  237.  
  238. #==============================================================================
  239. # ■ Battle Cursor Index
  240. #==============================================================================
  241. module Battle_Cursor_index
  242.   include MOG_BATTLE_CURSOR
  243.   #--------------------------------------------------------------------------
  244.   # ● Check Index Limit
  245.   #--------------------------------------------------------------------------      
  246.   def check_index_limit
  247.       self.index = 0 if self.index >= item_max
  248.       self.index = (item_max - 1) if self.index < 0
  249.   end      
  250.  
  251.   #--------------------------------------------------------------------------
  252.   # ● Set Cursor Position Enemy
  253.   #--------------------------------------------------------------------------   
  254.   def set_cursor_position_enemy
  255.       return if !self.active
  256.       $game_temp.battle_cursor[0] = $game_troop.alive_members[self.index].screen_x + CURSOR_POSITION[0] rescue nil
  257.       $game_temp.battle_cursor[1] = $game_troop.alive_members[self.index].screen_y + CURSOR_POSITION[1] rescue nil
  258.       $game_temp.battle_cursor[3] = $game_troop.alive_members[self.index].name rescue nil
  259.       $game_temp.battle_cursor = [0,0,false,0] if $game_temp.battle_cursor[0] == nil
  260.   end
  261.  
  262.   #--------------------------------------------------------------------------
  263.   # ● Set Cursor Position Actor
  264.   #--------------------------------------------------------------------------   
  265.   def set_cursor_position_actor
  266.       return if !self.active
  267.       $game_temp.battle_cursor[0] = $game_party.members[self.index].screen_x + CURSOR_POSITION[0] rescue nil
  268.       $game_temp.battle_cursor[1] = $game_party.members[self.index].screen_y + CURSOR_POSITION[1] rescue nil
  269.       $game_temp.battle_cursor[3] = $game_party.members[self.index].name rescue nil
  270.       $game_temp.battle_cursor = [0,0,false,0] if $game_temp.battle_cursor[0] == nil
  271.   end  
  272.  
  273.   #--------------------------------------------------------------------------
  274.   # ● Process Cursor Move
  275.   #--------------------------------------------------------------------------
  276.   def process_cursor_move
  277.       return unless cursor_movable?
  278.       last_index = @index
  279.       cursor_move_index(+1) if Input.repeat?(:DOWN)
  280.       cursor_move_index(-1) if Input.repeat?(:UP)
  281.       cursor_move_index(+1) if Input.repeat?(:RIGHT)
  282.       cursor_move_index(-1) if Input.repeat?(:LEFT)
  283.       if @index != last_index
  284.          Sound.play_cursor
  285.       end
  286.   end
  287.  
  288.   #--------------------------------------------------------------------------
  289.   # ● Process Cursor Move Index
  290.   #--------------------------------------------------------------------------  
  291.   def cursor_move_index(value = 0)
  292.       self.index += value
  293.       check_index_limit
  294.   end
  295.  
  296. end
  297.  
  298. #==============================================================================
  299. # ■ Window_BattleActor
  300. #==============================================================================
  301. class Window_BattleActor < Window_BattleStatus
  302.   include Battle_Cursor_index
  303.  
  304.   #--------------------------------------------------------------------------
  305.   # ● Update
  306.   #--------------------------------------------------------------------------  
  307.   def update
  308.       super
  309.       set_cursor_position_actor
  310.   end  
  311.  
  312.   #--------------------------------------------------------------------------
  313.   # ● Show
  314.   #--------------------------------------------------------------------------
  315.   alias mog_battle_cursor_show show
  316.   def show
  317.       if @info_viewport
  318.          set_cursor_position_actor
  319.          $game_temp.battle_cursor[2] = true
  320.       end
  321.       mog_battle_cursor_show
  322.   end
  323.  
  324.   #--------------------------------------------------------------------------
  325.   # ● Hide
  326.   #--------------------------------------------------------------------------
  327.   alias mog_battle_cursor_hide hide
  328.   def hide
  329.       if @info_viewport
  330.           $game_temp.battle_cursor[2] = false
  331.       end
  332.       mog_battle_cursor_hide
  333.   end  
  334.  
  335. end
  336.  
  337. #==============================================================================
  338. # ■ Window_BattleEnemy
  339. #==============================================================================
  340. class Window_BattleEnemy < Window_Selectable
  341.   include Battle_Cursor_index
  342.  
  343.   #--------------------------------------------------------------------------
  344.   # ● Update
  345.   #--------------------------------------------------------------------------  
  346.   def update
  347.       super
  348.       set_cursor_position_enemy
  349.   end
  350.  
  351.   #--------------------------------------------------------------------------
  352.   # ● Show
  353.   #--------------------------------------------------------------------------
  354.   alias mog_battle_cursor_show show
  355.   def show
  356.       if @info_viewport
  357.          set_cursor_position_enemy
  358.          $game_temp.battle_cursor[2] = true
  359.       end
  360.       mog_battle_cursor_show
  361.   end
  362.  
  363.   #--------------------------------------------------------------------------
  364.   # ● Hide
  365.   #--------------------------------------------------------------------------
  366.   alias mog_battle_cursor_hide hide
  367.   def hide
  368.       if @info_viewport
  369.           $game_temp.battle_cursor[2] = false
  370.       end
  371.       mog_battle_cursor_hide
  372.   end  
  373.  
  374. end
  375.  
  376. $mog_rgss3_battle_cursor = true

点评

感激不尽。。~  发表于 2015-3-14 17:57
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-25 23:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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