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

[转载发布] Attract Mode

[复制链接]
累计送礼:
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-1 15:22:51 | 显示全部楼层 |阅读模式

    Attract Mode 1.3
            by Racheal





    Introduction
            This script allows you to set up an attract mode when the player sits idle on the title screen, similar to many arcade and console games.

    Features


    • Sends the player to a blank map after a certain number of frames spent on the title screen.
    • Returns the player to the title screen with a press of a button.
    • *New* Choose to display attract mode once before the first time the title is shown

    How to Use
            Insert the script anywhere in the Materials section above Main and then configure the options.

    Script

    SpoilerSpoiler






    #==============================================================================
    # Attract Mode
    # by: Racheal
    # Version 1.3
    # Created: 09/12/2013
    # Updated: 10/12/2013
    #==============================================================================
    # Allows you to set up an attract mode map if the player idles on the title
    # screen. Attract mode can be canceled at any time with the confirm or cancel
    # keys.
    #==============================================================================
    # Instructions:
    # * Insert in the Materials section
    # * Configure to your liking below
    #==============================================================================

    #==============================================================================
    # Customization
    #==============================================================================
    module Racheal_Attract_Mode
      # Map that attract mode sends you to
      ATTRACT_MAP = 2

      # Set whether to view attract mode before the first time you se
      # title screen
      SHOW_FIRST = true

      # Amount of time (in frames) until attract mode kicks in
      # The time is set exceptionally low in this demo just so you don't have to
      # sit around and wait a long time to see it.
      WAIT = 320
    end
    #==============================================================================
    # End Customization
    #==============================================================================

    module Input

      BUTTONS = [
        :LEFT, :UP, :RIGHT,
    OWN,
        :A, :B, :C,
        :X, :Y, :Z,
        :L, :R,
        :SHIFT, :CTRL, :ALT,
        :F5, :F6, :F7, :F8, :F9
      ]

      def self.any_press?
        BUTTONS.any? {|i| press? i}
      end

    end

    #==============================================================================

    module DataManager
      #--------------------------------------------------------------------------
      # * Set Up Attract Mode
      #--------------------------------------------------------------------------
      def self.setup_attract
        create_game_objects
        $game_party.setup_starting_members
        $game_map.setup(Racheal_Attract_Mode::ATTRACT_MAP)
        $game_player.moveto(5, 5)
        $game_player.refresh
        Graphics.frame_count = 0
      end
    end

    #==============================================================================

    class Scene_Attract < Scene_Map
      #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      def update
        super
        SceneManager.goto(Scene_Title) if Input.any_press?
      end
    end

    #==============================================================================

    class Scene_Title < Scene_Base
      @@attract_seen = !Racheal_Attract_Mode::SHOW_FIRST
      #--------------------------------------------------------------------------
      # * Start Processing
      #--------------------------------------------------------------------------
      alias scene_title_start_attract_mode start
      def start
        unless @@attract_seen
          start_attract
          @@attract_seen = true
          return
        end
        scene_title_start_attract_mode
        @count = 0
      end
      #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      alias scene_title_update_attract_mode update
      def update
        scene_title_update_attract_mode
        @count += 1
        start_attract if @count == Racheal_Attract_Mode::WAIT
      end
      #--------------------------------------------------------------------------
      # * Termination Processing
      #--------------------------------------------------------------------------
      alias scene_title_terminate_attract_mode terminate
      def terminate
        Graphics.freeze
        scene_title_terminate_attract_mode if @viewport
      end
      #--------------------------------------------------------------------------
      # * Start Attract
      #--------------------------------------------------------------------------
      def start_attract
        DataManager.setup_attract
        close_command_window if @command_window
        fadeout_all
        $game_player.transparent = true
        $game_player.followers.visible = false
        $game_player.refresh
        $game_map.autoplay
        SceneManager.goto(Scene_Attract)
      end
    end





    Credit
            - Racheal

    Demo
    Download Here
            Please don't mind how silly the attract mode is. I already spent way more time on this demo than I did the script. I'm sure it can be used far more effectively than what I showed here.

    Author's Notes
            Free for commercial and non-commercial use. Just credit me (and let me know if you use it, just because).

    I'd like to eventually figure out an easy way to cancel the attract mode with any player input instead of just the main two keys like it is right now. I'll update the script if I figure out how I want to do this.
            Thanks to Super Cremno 64 Turbo HD, I've updated the script to allow for any standard button to cancel attract mode. The demo has also been updated.

            Since this script just teleports you to a map of your choosing, the possibilities for what you can do with it are pretty plentiful. My only recommendations are to not use anything that requires player input (i.e., a text box that doesn't auto-close) and to return to the title screen at the end of the auto-event.


    本贴来自国际rpgmaker官方论坛作者:Yato处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/attract-mode.20800/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-18 00:22 , Processed in 0.115503 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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