Save-Point
Custom message window - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Archives (https://www.save-point.org/forum-105.html)
+--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html)
+---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html)
+----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html)
+----- Thread: Custom message window (/thread-6778.html)



Custom message window - dragonslayer - 03-25-2005

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.


UPDATED
make a new script above the main and add this

Code:
class Message

def delay(wait)
count = Graphics.frame_count
while wait + count >= Graphics.frame_count
Graphics.update
end
end

def messages(message, x = 80, y = 304, width = 480, height = 160, waiting = 35)
   @message = message
   @x = x
   @y = y
   @waiting = waiting
   @width = width
   @height = height
@test_window = Window_Message.new
@test_window.contents.font.name = "Arial"
@test_window.contents.font.size = 18
@test_window.visible = true
@test_window.y = @y
@test_window.x = @x
@test_window.width = @width
@test_window.height = @height
@test_window.back_opacity = 190
x = 0
y = 0
while ((c = @message.slice!(/./m)) != nil)
w = @test_window.contents.text_size(c).width
h = @test_window.contents.text_size(c).height
if ((x + w) > 448)
  x = 0
  y += h
end
@test_window.contents.draw_text(x,y,w,h,c)
x += w
end
  delay(waiting)
@test_window.dispose
end
end

$msg = Message.new

now u can choose the location of the window message, u can make it as small as u want, and at the same time, choose how long it will show, this allow u to be able to show many messages at the same time

to call message just use
just call

Code:
$msg.messages(message, x , y, width, height, waiting)
message = to the message that will appear
x = x position of window
y = y position of window
width = width of window
height = height of window
waiting =  how long u want the message to show

:)