Credits Page - 00start.rpy?

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
CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Credits Page - 00start.rpy?

#1 Post by CellHG »

I'm trying to add a credits page to my game main menu.

I've created the screen for it in the screens.rpy file & linked it in the main menu as such:

Code: Select all

        hotspot ( 1434, 176, 396, 80) action Start() hovered Show("menutip", my_picture = "menu/button/menutip1.png", my_tt_xpos=1380, my_tt_ypos=1013) unhovered Hide("menutip")
        hotspot ( 1434, 272, 396, 80) action [ShowMenu("load"), Hide("menutip")] hovered Show("menutip", my_picture = "menu/button/menutip2.png", my_tt_xpos=1380, my_tt_ypos=1013) unhovered Hide("menutip")
        hotspot ( 1434, 366, 396, 80) action [ShowMenu("preferences")] hovered Show("menutip", my_picture = "menu/button/menutip3.png", my_tt_xpos=1380, my_tt_ypos=1013) unhovered Hide("menutip")
        hotspot ( 1434, 462, 396, 80) action [ShowMenu("credits"), Hide("mainmenu")] hovered Show("menutip", my_picture = "menu/button/menutip4.png", my_tt_xpos=1380, my_tt_ypos=1013) unhovered Hide("menutip")
        hotspot ( 1434, 557, 396, 80) action Quit(confirm=True) hovered Show("menutip", my_picture = "menu/button/menutip5.png", my_tt_xpos=1380, my_tt_ypos=1013) unhovered Hide("menutip")
but I keep getting the following error when clicking on credits on the menu:

Code: Select all

While running game code:
  File "renpy/common/00start.rpy", line 256, in script
    python:
  File "renpy/common/00start.rpy", line 260, in <module>
    renpy.call_in_new_context("_main_menu")
  File "renpy/common/00action_menu.rpy", line 100, in __call__
    raise Exception("%r is not a screen or a label." % orig_screen)
Exception: u'credits' is not a screen or a label.
What am I doing wrong?

Ace94
Regular
Posts: 113
Joined: Sat Apr 08, 2017 4:22 pm
Contact:

Re: Credits Page - 00start.rpy?

#2 Post by Ace94 »

I believe you have to have it declared as a label first in script.rpy and then have the label called back in your button like this:

Code: Select all

action Start('credits')
credits being the name of your label.

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Credits Page - 00start.rpy?

#3 Post by ArcialIntegra »

Um... I'm not sure if I'll be any help, but did you first take a look at the "About" screen's code and try modifying that to be a "Credits" screen? I don't really know anything about editing the 00start.rpy file, but I was able to create a Credits screen by manipulating the "About" screen. If that's not what you're looking for, you may still need to create a label for your credits in script.rpy like Ace94 said. Alternatively, you may not have the label in your screens.rpy properly identified according to your hotspot. Can you share us that code as well? (Redacted if needed to conserve space.)

CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Re: Credits Page - 00start.rpy?

#4 Post by CellHG »

I decided to totally re-code it, using the same code and it somehow starting working, must have missed something the first time around :P

Post Reply

Who is online

Users browsing this forum: DewyNebula