Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Message Pause
#1
Custom Message Pause
by Sheol
Version: 1.0


Last Update
September 19, 2006

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.

Introduction

This small script lets you use a different graphic with a different position for the pause animation in the message window.

Screenshots

[Image: custom_message_pause2.jpg]

Script
Code:
#==============================================================================
# ** Custom Message Pause
#------------------------------------------------------------------------------
# Slipknot (dubealex.com/asylum)
# Version 1.0
# September 19, 2006
#==============================================================================

class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  MessagePause_Image = 'mes_but'
  MessagePause_x = 32
  MessagePause_y = 32
  MessagePause_Frames = 20
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias slipknot_messagepause_init initialize
  alias slipknot_messagepause_upd update
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    slipknot_messagepause_init
    @pause_g = Sprite.new
    @pause_g.bitmap = RPG::Cache.picture(MessagePause_Image)
    @pause_g.src_rect.set(0, 0, 16, 16)
    @pause_g.visible = false
    @pause_g.z = z + 3
    @pause_g_frame = 0
  end
  #--------------------------------------------------------------------------
  # * Set Pause
  #--------------------------------------------------------------------------
  def pause=(arg)
    @pause_g.visible = arg
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    if @pause_g.visible
      @pause_g.x = x + width - MessagePause_x
      @pause_g.y = y + height - MessagePause_y
      f = MessagePause_Frames / 4
      case @pause_g_frame
      when 0..(f - 1)
        @pause_g.src_rect.set(0, 0, 16, 16)
      when f..(f * 2 - 1)
        @pause_g.src_rect.set(16, 0, 16, 16)
      when (f * 2)..(f * 3 - 1)
        @pause_g.src_rect.set(32, 0, 16, 16)
      else
        @pause_g.src_rect.set(48, 0, 16, 16)
      end
      @pause_g_frame += 1
      @pause_g_frame %= MessagePause_Frames
    end
    slipknot_messagepause_upd
  end
end


Instructions


Paste the script before Main and after Window_Message or a custom message script.
You also will need this picture (you can use it if you credit me [Image: smile.gif] )
[Image: mes_but.png]

Customization

MessagePause_Image: Filename of the picture, must be in the Pictures folder, its dimensions are: 64x16 (16x16 per frame)
MessagePause_x: x position of the graphic. Based on this formula: message x + message width - pause x
MessagePause_y: y position of the graphic. Based on this formula: message y + message height - pause y
MessagePause_Frames: Total frames for each animation frame.

Compatibility

This script must work with any script.

Author's Notes

Enjoy it and credit me.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Jaber's Super-Simple Message System Jaberwocky 0 2,489 04-25-2011, 01:00 PM
Last Post: Jaberwocky
  Picture Message Window Chrono Cry 0 2,260 10-12-2007, 01:00 PM
Last Post: Chrono Cry
  Scrolling Message System[ Sheol 0 2,346 05-13-2007, 01:00 PM
Last Post: Sheol
  Letter by Letter Message Window Sheol 0 2,134 09-08-2006, 01:00 PM
Last Post: Sheol



Users browsing this thread: