| 
 
| 赞 | 2 |  
| VIP | 2 |  
| 好人卡 | 4 |  
| 积分 | 1 |  
| 经验 | 96076 |  
| 最后登录 | 2015-12-27 |  
| 在线时间 | 93 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间93 小时注册时间2008-5-16帖子745 | 
| 本帖最后由 ★_茄孓 于 2010-8-19 22:05 编辑 
 加个小变量用把该脚本放到main前即可
 然后在事件脚本里用下面脚本来显示图片复制代码class Game_Screen
  attr_accessor   :sprites
 #--------------------------------------------------------------------------
  # ● 初试化对像
  #--------------------------------------------------------------------------
  def initialize
    @sprites = []
    @tone = Tone.new(0, 0, 0, 0)
    @tone_target = Tone.new(0, 0, 0, 0)
    @tone_duration = 0
    @flash_color = Color.new(0, 0, 0, 0)
    @flash_duration = 0
    @shake_power = 0
    @shake_speed = 0
    @shake_duration = 0
    @shake_direction = 1
    @shake = 0
    @pictures = [nil]
    for i in 1..100
      @pictures.push(Game_Picture.new(i))
    end
    @weather_type = 0
    @weather_max = 0.0
    @weather_type_target = 0
    @weather_max_target = 0.0
    @weather_duration = 0
  end
end
里面数值相应改变下即可了。复制代码
@id = 2010
$game_screen.sprites[@id] = Sprite.new
pic = $game_screen.sprites[@id]
pic.bitmap = RPG::Cache.picture("图片名")
pic.x = 100 ; pic.y = 100
pic.zoom_x = 1
pic.zoom_y = 1
pic.opacity = 255
pic.blend_type = 0
pic.angle = 0
用下面的脚本来消除图片
 下面是范例工程复制代码@id = 2010
$game_screen.sprites[@id].dispose
  Project24.rar
(271.47 KB, 下载次数: 151) | 
 评分
查看全部评分
 |