LoopUpdateCMD ACE

LoopUpdateCMD ACE

by Kyonides
​

Introduction

This scriptlet lets you create an update method that will refresh everything on screen while forcing the player to trigger some button to break the loop.

Take in consideration that the loop event command was not meant to be used this way. Thus, there was a need to create a simple way that could let you enable the Input.trigger? method almost as if you were creating a custom scene of your own.

How to Use

Create a loop and leave this script call inside.

Ruby:
loop_update

It must be the very first thing it processes there.

Now take a look at the screenshots.

Spoiler: 2 Screenshots
loopupdatecmd_ace01.jpg
loopupdatecmd_ace02.PNG

VX ACE Script

Ruby:
# * LoopUpdateCMD ACE * #
#  Scripter : Kyonides Arkanthes
#  2024-03-11

# This scriptlet lets you create an update method that will refresh everything
# on screen while forcing the player to trigger some button to break the loop.

module LoopUpdate
  extend self
  attr_accessor :spriteset
end

class Game_Interpreter
  def loop_update
    Graphics.update
    Input.update
    $game_map.update
    $game_timer.update
    LoopUpdate.spriteset.update
    return true
  end
end

class Spriteset_Map
  alias :kyon_loop_up_cmd_sprtst_map_init :initialize
  def initialize
    LoopUpdate.spriteset = self
    kyon_loop_up_cmd_sprtst_map_init
  end
end

IMPORTANT NOTE​

Those that are used to implementing scripts in your game projects might have noticed that it includes a line that says $game_map.update and it passes no argument at all. That's done by design.

If it did pass it, you'd get an error message telling you that you can't call Fiber's resume method twice (double resume). So don't add anything there for your own sake.


Terms & Conditions

Free for ANY game.
Due credit is mandatory.
Mention this forum in your game credits.
That's it! 😛
IMPORTANT NOTE FOR VX ACE USERS​

Those that are used to implementing scripts in your game projects might have noticed that it includes a line that says $game_map.update and it passes no argument at all. That's done by design.

If it did pass it, you'd get an error message telling you that you can't call Fiber's resume method twice (double resume). So don't add anything there for your own sake. Really, I'm extremely serious about this.

Original thread: https://forums.rpgmakerweb.com/threads/loopupdatecmd-ace.166711/