Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Super Simple Message Phasing Script

A member sent me a PM for a request for something like this, took me less than a minute ;)

I'm not going to go all out on this topic, but basically what this script does is allow you to walk around while a message is being displayed, very simple!

To toggle message phasing, just type this line in a call script....

Code:
$game_temp.event_phasing = true/false

While true, you can walk during message, false you can't... and here's the script! :thumb:

Code:
#===============================================================================
# ** Game_Temp
#===============================================================================
class Game_Temp
  #-----------------------------------------------------------------------------
  attr_accessor :event_phasing
  #-----------------------------------------------------------------------------
  alias_method :kn_phasedmsgs_game_temp_initialize, :initialize
  #-----------------------------------------------------------------------------
  # * Initialize Method (*Aliased*)
  #-----------------------------------------------------------------------------
  def initialize
    kn_phasedmsgs_game_temp_initialize
    @event_phasing = false
  end
end
#===============================================================================
# ** Game_Player
#-------------------------------------------------------------------------------
#   This class has been 'slightly' modified to allow you to walk while
# a message is being displayed.
#===============================================================================
class Game_Player < Game_Character
  # [Attributes]----------------------------------------------------------------
  attr_accessor :move_speed
  attr_accessor :move_frequency
  #-----------------------------------------------------------------------------
  alias_method :kn_8dir_game_player_update, :update
  #-----------------------------------------------------------------------------
  # * Update Method
  #-----------------------------------------------------------------------------
  def update
    kn_8dir_game_player_update
      unless moving? or @move_route_forcing or $game_system.map_interpreter.running? 
      if $game_temp.message_window_showing and $game_temp.event_phasing
        # Move player in the direction the directional button is being pressed
        case Input.dir8
        when 2 # Down
          move_down
        when 4 # Left
          move_left
        when 6 # Right
          move_right
        when 8 # Up
          move_up
        when 1 # Down Left
          move_lower_left
        when 3 # Down Right
          move_lower_right
        when 7 # Upper Left
          move_upper_left
        when 9 # Upper Right
          move_upper_right
        end
      end
    end
  end
end
 
Why not? You can move events when it's false normally... Right? :tongue:

Also, why ask that question when you can just test it for yourself?

Good work, Kain! :wink:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top