Coding Blue's [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
Alex~kun
Newbie
Posts: 10
Joined: Fri Aug 07, 2009 2:11 am
Completed: N/A
Projects: Tatari
Contact:

Coding Blue's [Solved]

#1 Post by Alex~kun »

Alright, I've finally gotten stuck in coding limbo, and I haven't been able to find the answer, so maybe one of you can help me out.

What I'm trying to do is code it so that from the main menu, you can select an option, and it takes you to it. Now I thought this was a simple action -> label scenario, but I'm apparently missing something (something obvious I'm sure. I'm not the best programmer sometimes...). Anyways, let me show ya...

Code: Select all

        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Armory") action Armory()
        textbutton _("Encyclopedia") 
        textbutton _("Gallery")
        textbutton _("Grimoire")
        textbutton _("Music Box")
        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit(confirm=False)
For now, focus on Armory. As you see, I have textbutton _("Armory") action Armory(). In a seperate tab/file, I have the label like so;

Tab/file name is "Armory.rpy" without the "".

Code: Select all

label Armory:
I'm probably missing something painfully obvious, but I just don't see it. Someone want to help out a newbie programmer?
Last edited by Alex~kun on Tue Jan 10, 2012 9:04 pm, edited 1 time in total.

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: Coding Blue's

#2 Post by Camille »

The button should be:

Code: Select all

textbutton _("Armory") action ShowMenu("Armory")

Alex~kun
Newbie
Posts: 10
Joined: Fri Aug 07, 2009 2:11 am
Completed: N/A
Projects: Tatari
Contact:

Re: Coding Blue's

#3 Post by Alex~kun »

Camille wrote:The button should be:

Code: Select all

textbutton _("Armory") action ShowMenu("Armory")
Facepalm.jpg

Thank you, that worked. I knew it was painfully obvious. Thanks again.

Post Reply

Who is online

Users browsing this forum: Google [Bot]