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

Project1

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

[已经解决] 如何把SideView里的放技能前显示立绘单独拿出来

[复制链接]

Lv1.梦旅人

梦石
0
星屑
201
在线时间
278 小时
注册时间
2009-8-9
帖子
38
跳转到指定楼层
1
发表于 2015-3-31 20:34:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
4星屑
SideView里有一个技能,是放技能前会显示使用角色的立绘。我想要这个技能的效果,但是我又不想要SideView的其它效果,什么横版啊什么的都不要。请问怎么才能把这个技能的脚本单独弄出来?
PS:用公共事件假技能的方法,放技能会有奇怪的提示和一下卡顿。感觉没有SideView里的效果好。

最佳答案

查看完整内容

使用方法:把图片放到GRAPHICS/Battlers文件夹下,图片名命名规则为:BATTLER_NAME_ougi1.png,例如:艾里克_ougi1,并在对应的技能备注里写上

点评

额,单独做一个角色的技能动画,然后你把角色图片做成战斗动画,加到技能动画播放前边就好了。  发表于 2015-3-31 22:04

Lv3.寻梦者

梦石
0
星屑
3228
在线时间
1120 小时
注册时间
2009-4-15
帖子
815
2
发表于 2015-3-31 20:35:00 | 只看该作者
  1. #==============================================================================
  2. # +++ MOG - Ougi Animation  (v1.1) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # http://www.atelier-rgss.com/
  6. #==============================================================================
  7. # Apresenta uma animação em pictures antes de ativar alguma ação.
  8. #==============================================================================
  9. # Serão necessários os seguintes arquivos na pasta Graphics/Battler/.
  10. #
  11. # BATTLER_NAME_ougi1.png
  12. # BATTLER_NAME_ougi2.png
  13. #
  14. #==============================================================================
  15. # Para ativar a animação basta colocar o seguinte comentário na caixa de notas
  16. # da skill ou itens.
  17. #
  18. # <Ougi Animation>
  19. #
  20. #==============================================================================
  21. module MOG_OUGI_ANIMATION
  22.   #Definição do som ao ativar a animação.  
  23.   SOUND_FILE = "Flash2"  
  24. end

  25. #==============================================================================
  26. # ● Histórico (Version History)
  27. #==============================================================================
  28. # v 1.1 - Compatibilidade com o script de pause.
  29. #==============================================================================

  30. #==============================================================================
  31. # ■ Scene_Battle
  32. #==============================================================================
  33. class Scene_Battle < Scene_Base
  34.   
  35.   #--------------------------------------------------------------------------
  36.   # ● Use Item
  37.   #--------------------------------------------------------------------------
  38.   alias mog_sp_animation_use_item use_item
  39.   def use_item
  40.       update_sp_animation
  41.       mog_sp_animation_use_item
  42.   end
  43.   
  44.   #--------------------------------------------------------------------------
  45.   # ● Can SP Animation?
  46.   #--------------------------------------------------------------------------   
  47.   def can_sp_animation?
  48.       skill = @subject.current_action.item
  49.       return true if skill.note =~ /<Ougi Animation>/
  50.       return false
  51.   end
  52.   
  53.   #--------------------------------------------------------------------------
  54.   # ● Update SP Animation
  55.   #--------------------------------------------------------------------------  
  56.   def update_sp_animation
  57.       return unless can_sp_animation?
  58.       special_animation = Ougi_Animation.new(@subject)
  59.       loop do
  60.           special_animation.update
  61.           Graphics.update
  62.           Input.update
  63.           break if special_animation.phase == 3
  64.       end
  65.       special_animation.dispose
  66.   end

  67. end

  68. #==============================================================================
  69. # ■ Ougi Animation
  70. #==============================================================================
  71. class Ougi_Animation
  72.   
  73.   include MOG_OUGI_ANIMATION

  74.   attr_accessor :phase
  75.   
  76.   #--------------------------------------------------------------------------
  77.   # ● Initialize
  78.   #--------------------------------------------------------------------------   
  79.   def initialize(subject)
  80.       @phase = 0
  81.       create_battler_sprite(subject)
  82.       create_background_sprite(subject)
  83.       if @phase != 3
  84.          Audio.se_play("Audio/SE/" + SOUND_FILE.to_s, 100, 100) rescue nil
  85.       end         
  86.   end   
  87.   
  88.   #--------------------------------------------------------------------------
  89.   # ● Create Background
  90.   #--------------------------------------------------------------------------      
  91.   def create_background_sprite(subject)
  92.       @background_sprite = Sprite.new
  93.       bname = subject.name + "_ougi2"
  94.       @background_sprite.bitmap = Cache.battler(bname,0) rescue nil      
  95.       @background_sprite.z = 1000
  96.       @background_sprite.opacity = 0
  97.       @background_sprite.zoom_x = 1.00
  98.       @background_sprite.zoom_y = 1.00
  99.       if @background_sprite.bitmap != nil
  100.          @background_sprite.ox = @background_sprite.bitmap.width / 2
  101.          @background_sprite.oy = @background_sprite.bitmap.height / 2
  102.          @background_sprite.x = @background_sprite.ox
  103.          @background_sprite.y = @background_sprite.oy
  104.       end
  105.       @phase = @background_sprite.bitmap != nil ? 0 : 3
  106.   end
  107.   
  108.   #--------------------------------------------------------------------------
  109.   # ● Create Battler Sprite
  110.   #--------------------------------------------------------------------------      
  111.   def create_battler_sprite(subject)
  112.       @battler_sprite = Sprite.new
  113.       bname = subject.name + "_ougi1"
  114.       @battler_sprite.bitmap = Cache.battler(bname,0) rescue nil
  115.       @battler_sprite.z = 1001
  116.       @battler_org = [0,0]
  117.       if @battler_sprite.bitmap != nil
  118.          @battler_sprite.ox = @battler_sprite.bitmap.width / 2
  119.          @battler_sprite.oy = @battler_sprite.bitmap.height / 2
  120.          px = @battler_sprite.ox  + ((Graphics.width / 2) - (@battler_sprite.bitmap.width / 2))
  121.          @battler_sprite.y = @battler_sprite.oy + (Graphics.height - @battler_sprite.bitmap.height)
  122.          @battler_org = [px - 130,px]
  123.          @battler_sprite.x = @battler_org[0]
  124.      end
  125.      @battler_sprite.zoom_x = 2
  126.      @battler_sprite.zoom_y = 2
  127.      @battler_sprite.opacity = 0
  128.      @phase = @battler_sprite.bitmap != nil ? 0 : 3     
  129.   end      
  130.   
  131.   #--------------------------------------------------------------------------
  132.   # ● Dispose
  133.   #--------------------------------------------------------------------------   
  134.   def dispose
  135.       dispose_battler_sprite
  136.       dispose_background_sprite
  137.   end
  138.   
  139.   #--------------------------------------------------------------------------
  140.   # ● Dispose Battler Sprite
  141.   #--------------------------------------------------------------------------      
  142.   def dispose_battler_sprite
  143.       return if @battler_sprite == nil
  144.       if @battler_sprite.bitmap != nil
  145.          @battler_sprite.bitmap.dispose
  146.          @battler_sprite.bitmap = nil
  147.       end
  148.       @battler_sprite.dispose
  149.       @battler_sprite = nil   
  150.   end  
  151.   
  152.   #--------------------------------------------------------------------------
  153.   # ● Dispose Background Sprite
  154.   #--------------------------------------------------------------------------        
  155.   def dispose_background_sprite
  156.       return if @background_sprite == nil
  157.       if @background_sprite.bitmap != nil
  158.          @background_sprite.bitmap.dispose
  159.          @background_sprite.bitmap = nil
  160.       end  
  161.       @background_sprite.dispose
  162.       @background_sprite = nil
  163.   end  
  164.   
  165.   #--------------------------------------------------------------------------
  166.   # ● Update
  167.   #--------------------------------------------------------------------------   
  168.   def update
  169.       if $mog_rgss3_pause != nil
  170.          update_pause if MOG_PAUSE::PAUSE_SCENE_BATTLE
  171.       end
  172.       return if @phase == 3
  173.       case @phase
  174.         when 0; update_start
  175.         when 1; update_slide
  176.         when 2; update_end  
  177.      end
  178.      @background_sprite.zoom_x += 0.004
  179.      @background_sprite.zoom_y = @background_sprite.zoom_x
  180.   end  
  181.   
  182.   #--------------------------------------------------------------------------
  183.   # ● Update Start
  184.   #--------------------------------------------------------------------------      
  185.   def update_start
  186.       @battler_sprite.zoom_x -= 0.03
  187.       @battler_sprite.opacity += 5
  188.       @background_sprite.opacity += 10
  189.       @battler_sprite.x += 3
  190.       if @battler_sprite.zoom_x <= 1.00
  191.          @battler_sprite.zoom_x = 1.00
  192.          @battler_sprite.opacity = 255
  193.          @background_sprite.opacity = 255
  194.          @phase = 1
  195.       end   
  196.       @battler_sprite.zoom_y = @battler_sprite.zoom_x
  197.   end  
  198.       
  199.   #--------------------------------------------------------------------------
  200.   # ● Update Slide
  201.   #--------------------------------------------------------------------------        
  202.   def update_slide
  203.       @battler_sprite.x += 1
  204.       @phase = 2 if @battler_sprite.x >= @battler_org[1]
  205.   end

  206.   #--------------------------------------------------------------------------
  207.   # ● Update End
  208.   #--------------------------------------------------------------------------        
  209.   def update_end
  210.       @battler_sprite.zoom_x += 0.03
  211.       @battler_sprite.zoom_y = @battler_sprite.zoom_x
  212.       @battler_sprite.opacity -= 5
  213.       @background_sprite.opacity -= 5
  214.       @phase = 3 if @battler_sprite.opacity <= 0
  215.   end  
  216.   
  217. end

  218. $mog_rgss_ougi_animation = true
复制代码
使用方法:把图片放到GRAPHICS/Battlers文件夹下,图片名命名规则为:BATTLER_NAME_ougi1.png,例如:艾里克_ougi1,并在对应的技能备注里写上<Ougi Animation>
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

3
发表于 2015-3-31 22:41:15 | 只看该作者
把立绘放进动画的部分不就好了吗···除非你1个立绘用几十个技能
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
201
在线时间
278 小时
注册时间
2009-8-9
帖子
38
4
 楼主| 发表于 2015-4-1 23:28:54 | 只看该作者
tan12345 发表于 2015-4-1 08:16
使用方法:把图片放到GRAPHICS/Battlers文件夹下,图片名命名规则为:BATTLER_NAME_ougi1.png,例如:艾里克 ...

你这个……感觉不能用啊,感觉少了什么,不过我用这个名字搜索到了1.8版本的范例,这个真的好强大……不过感觉用起来有点难度,还要再研究研究。
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

5
发表于 2015-4-1 23:30:42 | 只看该作者
tan12345 发表于 2015-3-31 03:35
使用方法:把图片放到GRAPHICS/Battlers文件夹下,图片名命名规则为:BATTLER_NAME_ougi1.png,例如:艾里克 ...

@VIPArcher 悬赏解决···(悬赏解决了标签居然还是有事请教···)

评分

参与人数 1星屑 +66 收起 理由
VIPArcher + 66 谢谢提醒

查看全部评分

[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-15 17:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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