| 赞 | 1  | 
 
| VIP | 0 | 
 
| 好人卡 | 1 | 
 
| 积分 | 1 | 
 
| 经验 | 5436 | 
 
| 最后登录 | 2023-1-31 | 
 
| 在线时间 | 585 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 68 
 
        - 在线时间
 - 585 小时
 
        - 注册时间
 - 2013-5-25
 
        - 帖子
 - 1524
 
 
 
 | 
	
 本帖最后由 克莉丝 于 2014-8-14 10:31 编辑  
 
$game_screen.pictures[n].fix_to_map 
之后图片会随地图滚动不需要用并行事件显示... 
$game_screen.pictures[n].fix_to_event(event_id) 
与事件固定 
 
事件\脚本见下 
 
 
 
 
- class Game_Picture
 
 -   def fix_to_map
 
 -     @fix_to_map = [$game_map.display_x / 4,$game_map.display_y / 4]
 
 -   end
 
 -   def fix_to_map?
 
 -     @fix_to_map
 
 -   end
 
 -   def fix_to_event(event_id)
 
 -     @fix_to_event = [$game_map.map_id,event_id]
 
 -   end
 
 -   def fix_to_event?
 
 -     @fix_to_event
 
 -   end
 
 -   alias show_crysse2014814 show
 
 -   def show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
 
 -     show_crysse2014814(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
 
 -     @fix_to_map = false
 
 -     @fix_to_event = false
 
 -   end
 
 - end
 
 - class Sprite_Picture < Sprite
 
 -   alias update_crysse2014814 update
 
 -   def update
 
 -     update_crysse2014814
 
 -     if $scene.is_a?(Scene_Map) and @picture.fix_to_map?
 
 -       self.x = @picture.x - $game_map.display_x / 4 + @picture.fix_to_map?[0]
 
 -       self.y = @picture.y - $game_map.display_y / 4 + @picture.fix_to_map?[1]
 
 -     end
 
 -     if $scene.is_a?(Scene_Map) and @picture.fix_to_event?
 
 -       return if @picture.fix_to_event?[0] != $game_map.map_id
 
 -       self.x = @picture.x+$game_map.events[@picture.fix_to_event?[1]].screen_x
 
 -       self.y = @picture.y+$game_map.events[@picture.fix_to_event?[1]].screen_y
 
 -     end
 
 -   end
 
 - end
 
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |