Converting Message System Into A Button (SOLVED)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
BirdKun
Newbie
Posts: 5
Joined: Fri Dec 19, 2014 1:40 pm
Projects: My Mary-Sue
Tumblr: nancyxbucket2
Deviantart: ChiceyDice
Skype: MiruKakuBirdKun
Location: Tennessee
Contact:

Converting Message System Into A Button (SOLVED)

#1 Post by BirdKun »

I wanted to ask if there's anyway to kind of convert this Message System (http://www.renpy.org/wiki/renpy/doc/coo ... e_Messages) into a little QuickMenu button. So I could click it and the whole inbox/message thing would pop up, like it triggered the " $ show_messages() " label/variable/code thing. How could I do that? If I even can, I mean.

EDIT: Nevermind! Through lots of trial and error I did it!

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Converting Message System Into A Button (SOLVED)

#2 Post by Karl_C »

How did you solve it?

It's possibly interesting for others too?

User avatar
BirdKun
Newbie
Posts: 5
Joined: Fri Dec 19, 2014 1:40 pm
Projects: My Mary-Sue
Tumblr: nancyxbucket2
Deviantart: ChiceyDice
Skype: MiruKakuBirdKun
Location: Tennessee
Contact:

Re: Converting Message System Into A Button (SOLVED)

#3 Post by BirdKun »

First, I created a label and stuff. I put it at the end of the script.rpy after the return action so you would be returned to the menu screen without the label interfering. My label looked like this, though it can be named to whatever you want.

Code: Select all

label show_all_messages:
    $ show_messages()
Then in the screens.rpy, down at the bottom where all of the other quick menu buttons are, I made a new one. My personal one looked like this, but the "Messages" can be renamed to whatever you want, and the "show_all_messages" must be named after your label (ie if your label was "messages" you would change the show_all_messages to just messages)

Code: Select all

textbutton _("Messages") action ShowMenu("show_all_messages")
There you have it! Now you can add messages with the messaging system as you please. You can also do this with lots of other things, ie stats, just random menus, and other features!
I tested all of this code out by myself again before I pasted it here, so i can guarantee that it works.

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Converting Message System Into A Button (SOLVED)

#4 Post by Karl_C »

Thank you!

User avatar
BirdKun
Newbie
Posts: 5
Joined: Fri Dec 19, 2014 1:40 pm
Projects: My Mary-Sue
Tumblr: nancyxbucket2
Deviantart: ChiceyDice
Skype: MiruKakuBirdKun
Location: Tennessee
Contact:

Re: Converting Message System Into A Button (SOLVED)

#5 Post by BirdKun »

You're welcome! I'm actually surprised I even did it in the first place. :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]