设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 109|回复: 0

[转载发布] FG7 - Easy Parallax Map Lock

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 19:18:41 | 显示全部楼层 |阅读模式
    Easy Parallax Map Lock
    By: FamilyGamer7​


    Introduction
                            Quick and easy script snippet to lock the tile(s) and parallax background together. (Inspiration from Yanfly - Parallax Lock script)               
    Click to expand...


    Features
                            Locks the Parallax background with the tiles when moving on screen and you will have the ability to turn the script functionality "Off/On" during the game with a script call.               
    Click to expand...


    Screenshot(s)
                            - Not Needed -               
    Click to expand...


    Script
    Spoiler: FG7 - Easy Parallax Map Lock
                    Ruby:       
    1. #==============================================================================
    2. # Title: Easy Parallax Map Lock
    3. # Author: FamilyGamer7 (FG7)
    4. # Version: 1.0
    5. # Engine: RPG Maker VX Ace
    6. # (Inspiration from Yanfly - Parallax Lock script)
    7. #==============================================================================
    8. # ** Change Log |
    9. # ---------------
    10. # 1.0 => Created script
    11. #==============================================================================
    12. # ** Description |
    13. # ----------------
    14. # Quick and easy script snippet to lock the tile(s) and parallax together.
    15. # (Locks the Parallax background with the tiles when moving on screen)
    16. #==============================================================================
    17. # ** Terms of Use |
    18. # -----------------
    19. # * Free to use in non-commercial projects and commercial projects
    20. # * Feel free to modify and improve the script. Credit is still required.
    21. # * Credit FamilyGamer7
    22. #==============================================================================
    23. # ** Usage |
    24. # ----------
    25. # * Plug & Play
    26. #
    27. # By default, this parallax map lock will be set as ON. Feel free to turn off
    28. # the script functionality with the script call(s) below.
    29. #
    30. # - Script calls provides ability for ON/OFF functionality during game.
    31. #
    32. # To turn OFF parallax map lock:
    33. # $game_system.parallax_map_lock_off = true
    34. #
    35. # To turn ON parallax map lock:
    36. # $game_system.parallax_map_lock_off = false
    37. #==============================================================================
    38. #==============================================================================
    39. # ** Module: FG7::Easy_Parallax_Map_Lock
    40. #------------------------------------------------------------------------------
    41. #  This modules creates a static variable to be used within the script.
    42. #==============================================================================
    43. module FG7
    44.   module Easy_Parallax_Map_Lock
    45. #==============================================================================
    46. # -------------------- ALLOWED TO EDIT BELOW THIS LINE ---------------------- #
    47. #==============================================================================
    48.     # Sets the value for the $game_switch used for the parallax map lock
    49.     Parallax_Map_Lock_Switch = 39
    50.    
    51. #==============================================================================
    52. # ---------- DO NOT EDIT BELOW THIS LINE (FOR ADVANCED USERS) --------------- #
    53. #==============================================================================
    54.   end
    55. end
    56. #==============================================================================
    57. # ** Game_System
    58. #------------------------------------------------------------------------------
    59. #  This class handles system data. It saves the disable state of saving and
    60. # menus. Instances of this class are referenced by $game_system.
    61. #==============================================================================
    62. class Game_System
    63.   #--------------------------------------------------------------------------
    64.   # * New Method: parallax_map_lock_off (Flag to turn on/off during game)
    65.   #--------------------------------------------------------------------------
    66.   def parallax_map_lock_off=(string)
    67.     @parallax_map_lock_off = string
    68.     $game_switches[FG7::Easy_Parallax_Map_Lock::Parallax_Map_Lock_Switch] = @parallax_map_lock_off
    69.   end
    70. end
    71. #==============================================================================
    72. # ** Game_Map
    73. #------------------------------------------------------------------------------
    74. #  This class handles maps. It includes scrolling and passage determination
    75. # functions. The instance of this class is referenced by $game_map.
    76. #==============================================================================
    77. class Game_Map
    78.   #--------------------------------------------------------------------------
    79.   # Override Method: Calculate X Coordinate of Parallax Display Origin
    80.   #--------------------------------------------------------------------------
    81.   alias :fg7_easy_parallax_map_lock_parallax_ox :parallax_ox
    82.   def parallax_ox(bitmap)
    83.     return @display_x * 32 if $game_switches[FG7::Easy_Parallax_Map_Lock::Parallax_Map_Lock_Switch] == false
    84.     fg7_easy_parallax_map_lock_parallax_ox(bitmap)
    85.   end
    86.   #--------------------------------------------------------------------------
    87.   # Override Method: Calculate Y Coordinate of Parallax Display Origin
    88.   #--------------------------------------------------------------------------
    89.   alias :fg7_easy_parallax_map_lock_parallax_oy :parallax_oy
    90.   def parallax_oy(bitmap)
    91.     return @display_y * 32 if $game_switches[FG7::Easy_Parallax_Map_Lock::Parallax_Map_Lock_Switch] == false
    92.     fg7_easy_parallax_map_lock_parallax_oy(bitmap)
    93.   end
    94. end
    复制代码


    How to Use
                            Add this script in the script editor under in the "Materials" section and above "Main Process".
    The instructions and setup for the script are held within the script header itself. No need to repeat here.               
    Click to expand...


    Terms of Use
                            - Free to use in non-commercial projects and commercial projects
    - Feel free to modify and improve the script. Credit is still required.
    - Credit FamilyGamer7               
    Click to expand...




    本贴来自国际rpgmaker官方论坛作者:FG7处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/fg7-easy-parallax-map-lock.144939/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 09:25 , Processed in 0.128085 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表