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

Project1

 找回密码
 注册会员
搜索

我想问下怎么制作一个得到物品后的提示的效果

查看数: 1610 | 评论数: 2 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2011-1-22 19:12

正文摘要:

最好是一个图上面显示字 淡入淡出效果

回复

赤夜玄魔 发表于 2011-1-22 21:05:27
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。

  5. # 开关定义:

  6. $不显示金钱窗口 = 41

  7. $不显示物品窗口 = 42

  8. $不显示武器窗口 = 43

  9. $不显示防具窗口 = 44

  10. # 以上开关,当打开的时候,获得物品将不会提示,比如默认打开41号开关,获得金钱不再提示

  11. # ————————————————————————————————————

  12. class Interpreter  
  13.   #--------------------------------------------------------------------------
  14.   # ● 增减金钱
  15.   #--------------------------------------------------------------------------
  16.   def command_125
  17.     value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  18.     $game_party.gain_gold(value)
  19.     if $game_switches[$不显示金钱窗口]==false
  20.       carol3_66RPG = Window_Base.new((640-160)/2,128,180,100)
  21.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  22.       if value >= 0
  23.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
  24.         #——声效,可以自己改
  25.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  26.       else
  27.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
  28.         #——声效,可以自己改
  29.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  30.       end   
  31.       carol3_66RPG.contents.draw_text(0,32,240,32,value.abs.to_s)
  32.       carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,2)
  33.       carol3_66RPG.opacity = 160
  34.       for i in 0..30
  35.         Graphics.update
  36.       end
  37.       for i in 0..10
  38.         carol3_66RPG.opacity -= 30
  39.         carol3_66RPG.contents_opacity -= 30
  40.         Graphics.update
  41.       end
  42.       carol3_66RPG.dispose
  43.     end
  44.     return true
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # ● 增减物品
  48.   #--------------------------------------------------------------------------
  49.   def command_126
  50.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  51.     $game_party.gain_item(@parameters[0], value)
  52.     if $game_switches[$不显示物品窗口]==false
  53.       carol3_66RPG_item = $data_items[@parameters[0]]
  54.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  55.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  56.       if value >= 0
  57.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")   
  58.         #——声效,可以自己改
  59.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  60.       else
  61.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")   
  62.         #——声效,可以自己改
  63.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  64.       end
  65.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  66.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  67.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  68.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  69.       carol3_66RPG.opacity = 160
  70.       for i in 0..30
  71.         Graphics.update
  72.       end
  73.       for i in 0..10
  74.         carol3_66RPG.opacity -= 30
  75.         carol3_66RPG.contents_opacity -= 30
  76.         Graphics.update
  77.       end
  78.       carol3_66RPG.dispose
  79.     end
  80.     return true
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 增减武器
  84.   #--------------------------------------------------------------------------
  85.   def command_127
  86.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  87.     $game_party.gain_weapon(@parameters[0], value)
  88.     if $game_switches[$不显示武器窗口]==false
  89.       carol3_66RPG_item = $data_weapons[@parameters[0]]
  90.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  91.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  92.       if value >= 0
  93.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")   
  94.         #——声效,可以自己改
  95.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  96.       else
  97.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")   
  98.         #——声效,可以自己改
  99.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  100.       end
  101.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  102.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  103.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  104.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  105.       carol3_66RPG.opacity = 160
  106.       for i in 0..30
  107.         Graphics.update
  108.       end
  109.       for i in 0..10
  110.         carol3_66RPG.opacity -= 30
  111.         carol3_66RPG.contents_opacity -= 30
  112.         Graphics.update
  113.       end
  114.       carol3_66RPG.dispose
  115.     end
  116.     return true
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 增减防具
  120.   #--------------------------------------------------------------------------
  121.   def command_128
  122.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  123.     $game_party.gain_armor(@parameters[0], value)
  124.     if $game_switches[$不显示防具窗口]==false
  125.       carol3_66RPG_item = $data_armors[@parameters[0]]
  126.       carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
  127.       carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
  128.       if value >= 0
  129.         carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")   
  130.         #——声效,可以自己改
  131.         Audio.se_play("Audio/SE/"+"006-System06",80,100)
  132.       else
  133.         carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")   
  134.         #——声效,可以自己改
  135.         Audio.se_play("Audio/SE/"+"005-System05",80,100)
  136.       end
  137.       carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
  138.       carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
  139.       carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
  140.       carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
  141.       carol3_66RPG.opacity = 160
  142.       for i in 0..30
  143.         Graphics.update
  144.       end
  145.       for i in 0..10
  146.         carol3_66RPG.opacity -= 30
  147.         carol3_66RPG.contents_opacity -= 30
  148.         Graphics.update
  149.       end
  150.       carol3_66RPG.dispose
  151.     end
  152.     return true
  153.   end
  154. end



  155. #==============================================================================
  156. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  157. #==============================================================================
复制代码
这个效果也不知道是不是楼主说的那样,反正一直放在U盘没动过……也是以前收集的……实际上LZ可以去下柳柳制作的 新喷火大怪龙
Wind2010 发表于 2011-1-22 19:20:20
本帖最后由 Wind2010 于 2011-1-22 19:21 编辑

在In啥的地方重定义获得物品,根据获得的物品和数量显示图片和文字,然后消失图片,清除文字
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2025-2-22 00:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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