Jump command not working? - Issue with credits [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
Sleepyferret
Newbie
Posts: 22
Joined: Mon Sep 04, 2017 6:53 am
Contact:

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

#1 Post by Sleepyferret » Mon Sep 04, 2017 6:59 am

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

Sleepyferret
Newbie
Posts: 22
Joined: Mon Sep 04, 2017 6:53 am
Contact:

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

#2 Post by Sleepyferret » Wed Sep 06, 2017 11:51 am

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

adeRuZet
Newbie
Posts: 13
Joined: Wed Oct 04, 2017 11:23 am
Github: aderuZet
Contact:

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

#3 Post by adeRuZet » 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

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

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

#4 Post by Imperf3kt » Wed Oct 04, 2017 4:16 pm

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(#)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

adeRuZet
Newbie
Posts: 13
Joined: Wed Oct 04, 2017 11:23 am
Github: aderuZet
Contact:

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

#5 Post by adeRuZet » Wed Oct 04, 2017 5:18 pm

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)' ?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

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

#6 Post by Imperf3kt » Wed Oct 04, 2017 5:46 pm

Yes. Make sure you use the correct capitalisation too. A lower case true will not work.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

Post Reply

Who is online

Users browsing this forum: Bing [Bot]