Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-skip:
- # // Picture Follow Character
- # // By IceDragon
- # // Instructions:
- # // picture_follow(picture_id, character_id)
- # // int picture_id
- # // int character_id
- # // -1 - Player
- # // 0 - Current event
- # // 1 - every other event
- #-end:
- #-inject gen_class_header 'Game_Picture'
- class Game_Picture
- attr_accessor :flw_char_id
- alias flw_update update
- def update
- update_follow if @flw_char_id
- flw_update
- end
- def update_follow
- chara = $game_map.interpreter.get_character(@flw_char_id)
- @x = chara.screen_x
- @y = chara.screen_y - 16
- end
- end
- #-inject gen_class_header 'Game_Interpreter'
- class Game_Interpreter
- def picture_follow picture_id, character_id
- character_id = @event_id if character_id == 0
- screen.pictures[picture_id].flw_char_id = character_id
- end
- end
- #-inject gen_script_footer
Advertisement
Add Comment
Please, Sign In to add comment