Page 1 of 1

Jump command not working? - Issue with credits [SOLVED]

Posted: Mon Sep 04, 2017 6:59 am
by Sleepyferret
Hi all,

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! :)

Re: Jump command not working? - Issue with credits [SOLVED]

Posted: Wed Sep 06, 2017 11:51 am
by Sleepyferret
Thanks guys but I solved this myself eventually. It turns out that because I didn't have a hard=True command on the pauses, the game was auto-skipping it. Have added those in and now it's fixed :)

Re: Jump command not working? - Issue with credits [SOLVED]

Posted: Wed Oct 04, 2017 11:29 am
by adeRuZet
Im a new here too, and this is my first post.
Here i want to know more, since nobody reply your question and it solced by yourself. Could you provide me the example of what have u changed with?

Sory for my bad english

Re: Jump command not working? - Issue with credits [SOLVED]

Posted: Wed Oct 04, 2017 4:16 pm
by Imperf3kt
adeRuZet wrote:
Wed Oct 04, 2017 11:29 am
Im a new here too, and this is my first post.
Here i want to know more, since nobody reply your question and it solced by yourself. Could you provide me the example of what have u changed with?

Sory for my bad english
You just need to make sure you use renpy.pause(#, hard=True) where # is a number in seconds, instead of Pause(#)

Re: Jump command not working? - Issue with credits [SOLVED]

Posted: Wed Oct 04, 2017 5:18 pm
by adeRuZet
Imperf3kt wrote:
Wed Oct 04, 2017 4:16 pm
You just need to make sure you use renpy.pause(#, hard=True) where # is a number in seconds, instead of Pause(#)
Well, do u mean to change every 'with pause(#)' to '$ renpy.pause(#, hard=True)' ?

Re: Jump command not working? - Issue with credits [SOLVED]

Posted: Wed Oct 04, 2017 5:46 pm
by Imperf3kt
Yes. Make sure you use the correct capitalisation too. A lower case true will not work.