It is currently Wed Dec 30, 2009 8:48 pm
All times are UTC


Welcome
Welcome to <strong>PresStart</strong>.
[url=http://presstart.freeforums.org/profile.php?mode=register]Join[/url] PresStart today!


Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Custom Message Windows(Easy, GML Used)
PostPosted: Sat Aug 02, 2008 7:09 pm 
Offline
DYNOMITE!
User avatar

Joined: Thu Jul 03, 2008 8:10 am
Posts: 40
Location: USA
I really hate the default grey message windows. So, I am going to show you how to make your own.
First you are going to need a message background. So, create a background and make it (220 width x 88 height).

Next you will need a sprite for the message button. It needs three subimages. One for the button when no mouse is on it. The second for when the mouse is on top of it. The last one will be when someone clicks on it. (110 width x 30 height)

Now, here is the code. I suggest you put it in a main.

{
message_alpha(1);
message_background(/*your_message_background_here*/);
message_text_font("arial",14,c_green,0);
message_button(/*your_message_button_here*/);
message_button_font("arial",14,c_white,0);
message_size(400,0);
}


Now to explain the code. message_alpha is the transparency of the message. message_background sets the background you created. message_text_font sets the font, size, and color of your message. message_button sets the button sprite you made. message_button_font sets the font, size, and color of your message button. message_size sets the smallest size that your message box can be.

And there you are! I hope I never have to see those default messages ever again.

_________________
I am an Image in the Game Maker Quiz!

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 02, 2008 9:03 pm 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
That is fairly simple :)

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 4:09 am 
Offline
DYNOMITE!
User avatar

Joined: Thu Jul 03, 2008 8:10 am
Posts: 40
Location: USA
I forgot to add this bit about how to move the message box to wherever you want it in your game. However, it only works in one screen size. I'll give you a code to fix that in a minute. First of all go back to the object that fixes your messages up. Now add a draw event and add this:

Draw Event:

{
message_position(window_get_x()+200,window_get_y()+200);
message_size(400,400);
}

message_position sets the position of the message box. window_get_x() returns the window's current x. y is the same as x but it is y. message_size sets the width and height of your message box. Now there is only one problem. When the game changes to full screen the message box is still small and in the same position as it was when the game was not in full screen. So, here is a code that will fix that:

Again, in the draw event (delete the code from above and replace it with this):
if window_get_fullscreen()=false
{
message_position(192,528);
message_size(640,96);
}
else
{
message_position(0,634);
message_size(1025,136);
}

window_get_fullscreen returns if the game window is in full screen or not.

_________________
I am an Image in the Game Maker Quiz!

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 07, 2008 12:39 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
We may use this on our game :)

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 11:43 pm 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
Yo


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 3:43 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
...yo? lol :)

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 3:45 am 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
I don't know, I was really bored, I think there i was testing out the quick reply.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 3:47 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
Ah! I bet this code goes right over your head lol

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 3:58 am 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
Yeah, I am trying to teach myself HTML, but it is not working.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:00 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
I can teach you some if you want through Skype. I'll "PM" you my Skype name if you want.

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:03 am 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
I already have it remember....


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:04 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
I was pretending like I didn't know you... lol

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:12 am 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
oh, my bad, you can delete those, i know what you are tying to do.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:19 am 
Offline
The PresStart Admin Counsel

Joined: Thu Jan 31, 2008 1:48 am
Posts: 108
No sweat. Did you want my help with html. I know some and I have books and stuff.

_________________
Where the fun is at!
http://www.presstartpro.com/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 4:21 am 
Offline
FRO JOE MAMA

Joined: Thu Jul 02, 2009 9:36 pm
Posts: 59
Highscores: 7
Yeah, I would. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

It is currently Wed Dec 30, 2009 8:48 pm
All times are UTC

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum