Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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 1,969 09-02-2006, 01:00 PM
Last Post: Sonokawa
  Show Question Sheol 0 2,198 07-23-2006, 01:00 PM
Last Post: Sheol
  State Immunity Message mudgolem 0 2,046 06-05-2006, 01:00 PM
Last Post: mudgolem
  Show Map Name Sheol 0 2,130 04-02-2006, 01:00 PM
Last Post: Sheol
  Slipknot Advance Message System Sheol 0 2,269 01-02-2006, 01:00 PM
Last Post: Sheol
  Add-On For Craft Scene Derk-Jan 0 2,326 12-30-2005, 01:00 PM
Last Post: Derk-Jan
  Show all status names Guedez 0 1,969 12-26-2005, 01:00 PM
Last Post: Guedez
  My own Message System Sheol 0 2,257 11-22-2005, 01:00 PM
Last Post: Sheol
  Scene Generator nickname 0 1,946 11-14-2005, 01:00 PM
Last Post: nickname
  Introduction & Splash Scene SephirothSpawn 0 2,145 09-30-2005, 01:00 PM
Last Post: SephirothSpawn



Users browsing this thread: