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

[转载发布] Shaz Simple Mouse Script enable/disable FIX

[复制链接]
累计送礼:
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-3 12:42:36 | 显示全部楼层 |阅读模式
    Save Mouse Selection in Shaz' Super Simple Mouse System for Ace v.1.0

    Shaz and Engr. Shana




    This relates to Shaz' Mouse Script which is found here: http://forums.rpgmakerweb.com/index.php?/topic/17829-amaranths-super-simple-mouse-system-for-ace/

    Objective

    To give the player the choice to enable or disable the custom mouse at any point in the game.

    These two scripts, taken together, enable the game to remember the data when the player restarts the game after quitting entirely, and solve the bug of having both the custom mouse icon and the default mouse icon showing simultaneously if the player has changed their mind and re-enabled the mouse.

    How to use

    Place under Shaz' Mouse script, with Part One above Part Two.

    Designate an appropriate switch

    At the beginning of the game, use a script call to enable the mouse

    $mouse.enabled = true

    To give the player the choice have a mechanism (I use an extra line in the main Menu) which will run these script calls

    To enable the mouse:

    $mouse.enabled = true

    Mouse.shaz?(0)

    To disable the mouse

    $mouse.enabled = false

    Mouse.shaz?(1)

    Demo and screenshots

    Not applicable.

    Scripts

    Save Mouse Selection Part One

    Spoiler                Code:       
    1. #Save Mouse selection Part One
    2. #USE: Place under Shaz Super simple Mouse System
    3. #Select a switch and NAME IT.  Insert the number at line 11 without
    4. #leading zeros e.g. not switch = 008 but switch = 8
    5. #For further use information see Save Mouse selection Part Two which
    6. #must be used in conjunction with this script
    7. #CREDITS: Shaz, Engr. Shana
    8. #===============================================================================
    9. module SHAZ
    10.   module MouseSwitch
    11.     ENABLED_SWITCH = 4
    12.   end
    13. end
    14. class Sprite_Mouse < Sprite
    15.   def enabled=(value)
    16.     @enabled = value
    17.     $game_switches[SHAZ::MouseSwitch::ENABLED_SWITCH] = value
    18.     self.visible = value
    19.   end
    20. end
    21. module DataManager
    22.   class << self
    23.     alias shaz_mouse_switch_load_game load_game
    24.     alias shaz_mouse_switch_setup_new_game setup_new_game
    25.   end
    26.   def self.load_game(index)
    27.     loaded = shaz_mouse_switch_load_game(index)
    28.     if loaded
    29.       $mouse.enabled = $game_switches[SHAZ::MouseSwitch::ENABLED_SWITCH] if $mouse && $game_switches
    30.       return true
    31.     else
    32.       return false
    33.     end
    34.   end
    35.   def setup_new_game
    36.     shaz_mouse_switch_setup_new_game
    37.     $mouse.enabled = true if $mouse
    38.   end
    39. end
    40. class Sprite_Mouse < Sprite
    41.   def enabled=(value)
    42.     @enabled = value
    43.     $game_switches[SHAZ::MouseSwitch::ENABLED_SWITCH] = value
    44.     self.visible = value
    45.     Mouse.update
    46.   end
    47. end
    复制代码





    Save Mouse Selection Part Two

    Spoiler                Code:       
    1. #Save Mouse Selection Part Two
    2. #USE: Place under Save Mouse Selection Part One
    3. #Use an event with this script call at the beginning of the game so that
    4. #the game begins with the mouse enabled.
    5. #$mouse.enabled = true
    6. #To give the player the choice of enabling/disabling the mouse during the game
    7. #provide an event - e.g. as a choice in the Main Menu - which does the
    8. #following:
    9. #To enable the mouse
    10. #script call with 2 elements
    11. #$mouse.enabled = true
    12. #Mouse.shaz?(0)
    13. #To disable the mouse
    14. #script call with 2 elements
    15. #$mouse.enabled = false
    16. #Mouse.shaz?(1)
    17. #
    18. #CREDIT: Engr. Shana
    19. #===============================================================================
    20. module Mouse
    21.   def self.shaz?(show)
    22.     ShowCursor.call(show)
    23.   end
    24. end
    复制代码





    Credits

    I asked for the final fixes, and am posting it publicly because I think that other people may find it useful.  These are in no way my work.  Engr. Shana is happy for it to be made public.  Credit:

    Shaz

    Engr. Shana

    EDIT

    Forgot to put this in.

    Terms of use

    Free for commercial and non-commercial, but credit must be given.


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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 06:16 , Processed in 0.138231 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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