| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 1125 |  
| 最后登录 | 2013-3-22 |  
| 在线时间 | 37 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间37 小时注册时间2012-3-4帖子13 | 
| 
本帖最后由 自古蓝毛多苦逼 于 2012-12-1 21:24 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 如果我只想要在单个图片按下的时候触发开关14的话我脚本应该要怎么写? 比如说单点击cmd30_button_02的时候就触发开关14这样
 我只知道触发开关14就是在底下加个$game_switches[14] = true 其他我就不会了
 
   
 顺便附上脚本
 复制代码class Game_Picture 
 def name=(str) 
   @name = str 
 end 
end 
class Sprite_Picture 
 alias update_old update 
 def update 
   update_old 
   return if @picture_name == "" or @picture_name[/cmd/].nil? 
   mx,my = Mouse.get_mouse_pos 
   lx = self.x - self.ox 
   rx = lx + self.bitmap.width 
   ty = self.y - self.oy 
   by = ty + self.bitmap.height 
   if mx < lx or mx > rx or my < ty or my > by or 
     self.bitmap.get_pixel(mx-lx,my-ty).alpha == 0 
     @picture.name = @picture.name.split(/_/)[0]+"_"[email protected](/_/)[1] 
     return 
   end 
   if @picture.name.split(/_/)[2].nil? 
     @picture.name = @picture.name + "_02" 
     Audio.se_play("Audio/SE/decision")
   end 
   
   if Input.trigger?(13) 
     @picture.name.split(/_/)[0].sub(/cmd([0-9]+)/,"") 
     $game_temp.common_event_id = $1.to_i 
     Audio.se_play("Audio/SE/cancel")
   end
  end 
end
 | 
 |