Page 1 of 1

Coding Blue's [Solved]

Posted: Tue Jan 03, 2012 2:06 pm
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?

Re: Coding Blue's

Posted: Tue Jan 03, 2012 2:09 pm
by Camille
The button should be:

Code: Select all

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

Re: Coding Blue's

Posted: Tue Jan 03, 2012 2:13 pm
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.