Show a Message in any Scene
#1
This is a locked, two-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.


I came up with this while trying to make a class to be used as the super class for all Scenes. To cut time down drasticly.


For now, just place this method into the Scene you want the show a message in -

Code:
def message(text = '')
        $game_temp.message_text = text.dup
        message = Window_Message.new
        loop do
            $game_temp.message_text = text.dup
            message.update
            message.refresh
            Input.update
            Graphics.update
            break unless !(Input.trigger?(Input::C) or Input.trigger?(Input::B))
        end
        message.dispose
    end

And just do -

Code:
message("Text in quotes goes here.")


And it will show the message just like it would from an event.

The reason this won't work with Scene_Title, is because $game_temp doesn't exist there and it would require a complete re-write (easy, but would take forever) of the Window_Message class.
}
#2
 Oh, that's the long way.


Here's the short one.

Add a
Code:
@message_window = Window_Message.new


in the def main, and whenever you want a message to show, do this in any kind of definition that updates.
Code:
$game_temp.message_proc = Proc.new { @message_waiting = false }
$game_temp.message_text = "Text"
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto Skipping Message Sonokawa 0 2,373 09-02-2006, 01:00 PM
Last Post: Sonokawa
  Show Question Sheol 0 2,604 07-23-2006, 01:00 PM
Last Post: Sheol
  State Immunity Message mudgolem 0 2,430 06-05-2006, 01:00 PM
Last Post: mudgolem
  Show Map Name Sheol 0 2,519 04-02-2006, 01:00 PM
Last Post: Sheol
  Slipknot Advance Message System Sheol 0 2,676 01-02-2006, 01:00 PM
Last Post: Sheol
  Add-On For Craft Scene Derk-Jan 0 2,711 12-30-2005, 01:00 PM
Last Post: Derk-Jan
  Show all status names Guedez 0 2,328 12-26-2005, 01:00 PM
Last Post: Guedez
  My own Message System Sheol 0 2,627 11-22-2005, 01:00 PM
Last Post: Sheol
  Scene Generator nickname 0 2,312 11-14-2005, 01:00 PM
Last Post: nickname
  Introduction & Splash Scene SephirothSpawn 0 2,495 09-30-2005, 01:00 PM
Last Post: SephirothSpawn



Users browsing this thread: 1 Guest(s)