I am brand new to both coding and this forum, so I'm really sorry if this is a stupid nooby question!
I copied some code to try and make the credits for my game, but for some reason it won't jump to the label.
It doesn't come up with an error message or anything, it just skips the jump command entirely and ends the game.
I've tried having the credits block at the beginning of the script, at the end of it, having the init python block first and then second, and nothing changes. No error messages and no problems but it skips it entirely.
I'm not sure why this is and was hoping one of you would please be able to tell me? Obviously credits are really important!
It's probably something super obvious but I'm just so bad at this I can't work it out!!
My code is below:
Code: Select all
"I can't believe how lucky I am, to have this man who cares for me so much."
"Our future looks incredibly bright."
jump credits
label credits:
image splash = 'beach.jpg'
image cred = Text(credits_s, text_align=0.5)
image theend = Text("{size=80}Thank you for playing Castaways!", text_align=0.5)
image thanks = Text("{size=80}A game designed by SleepyFerret", text_align=0.5)
$ credits_speed = 25
scene bg beach
show cred at Move((0.5, 5.0), (0.5, 0.0), credits_speed, repeat=False, bounce=False, xanchor="center", yanchor="bottom")
show theend:
yanchor 0.5 ypos 0.5
xanchor 0.5 xpos 0.5
with dissolve
with Pause(5)
hide theend
with dissolve
with Pause(credits_speed - 5)
show splash
with dissolve
with Pause(3)
hide splash
with dissolve
with Pause(1)
show thanks:
yanchor 0.5 ypos 0.5
xanchor 0.5 xpos 0.5
with dissolve
with Pause(4)
hide thanks
with dissolve
return
init python:
credits = ('Backgrounds', 'http://beizen.pancakeapps.com/, Hard Rock Hotels, Google Images and Texic'), ('CGs', 'Leilunakitten'), ('Sprites', 'http://tokudaya.net/index.html and http://www.jewel-s.jp/download/'),('Writing', 'SleepyFerret'), ('Design', 'SleepyFerret'), ('Programming', 'SleepyFerret'), ('Music', 'Eric Matyas, Derek and Brandon Fiechter, Sophonic Media and The Honest Guys')
credits_s = "{size=80}Castaways\n\n"
c1 = ''
for c in credits:
if not c1==c[0]:
credits_s += "\n{size=60}" + c[0] + "\n"
credits_s += "{size=40}" + c[1] + "\n"
c1=c[0]
credits_s += "\n{size=60}Engine\n{size=40}" + renpy.version()Thanks in advance for your help!