Guest User

Untitled

a guest
Nov 15th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #=======================================================================
  2. # ** Lock Pictures
  3. # VX Original by KD , Ace Edit by Valentine
  4. # Credits: KD
  5. #-----------------------------------------------------------------------
  6. # Bild fixieren:
  7. # lock_scroll(PICTURE_ID)
  8. #
  9. # Bild nicht mehr fixieren:
  10. # unlock_scroll(PICTURE_ID)
  11. #=======================================================================
  12.  
  13. class Game_Picture
  14.  
  15. LOCK = true
  16. UNLOCK = false
  17.  
  18. #--------------------------------------------------------------------------
  19. # * Start processing
  20. #--------------------------------------------------------------------------
  21. def loki=(value)
  22. @loki = value
  23. end
  24.  
  25. def x
  26. if @loki then (@x - $game_map.display_x) * 32 else @x end
  27. end
  28.  
  29. def y
  30. if @loki then (@y - $game_map.display_y) * 32 else @y end
  31. end
  32.  
  33. alias pic_show show
  34. def show(*picture_lol)
  35. @move_with = UNLOCK
  36. pic_show(*picture_lol)
  37. end
  38. end
  39.  
  40. class Game_Interpreter
  41.  
  42. def lock_scroll(id, v=Game_Picture::LOCK)
  43. screen.pictures[id].loki = v if screen.pictures[id]
  44. true
  45. end
  46.  
  47. def unlock_scroll(id)
  48. lock_scroll(id,Game_Picture::UNLOCK)
  49. end
  50. end
Add Comment
Please, Sign In to add comment