What's wrong with my code? Help a noob out.

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
Jumatsuga
Newbie
Posts: 5
Joined: Tue May 25, 2021 2:45 pm
Location: Finland
Discord: Jumatsuga#1290
Contact:

What's wrong with my code? Help a noob out.

#1 Post by Jumatsuga » Wed Sep 01, 2021 11:42 am

Basically I am trying to make a phone-based game with app icons as imagebuttons on top of images of the phone, which would take the player to the next phone screen. I.e there is an image of a phone with apps, player clicks the app icon, the icon takes them to the app. However, the game simply ends and does not follow the "show" command for the image "phonetwo", even though the imagebutton works just fine. What am I doing wrong?

show phone1:
xalign 0.5
yalign 0.5


$ renpy.show_screen ("Mangle")

python:
ui.interact()

$ renpy.pause

label Welcome:

hide phone1

$ renpy.hide_screen ("Mangle")

MC "Alright. Let's make an account."

show phonetwo:
xalign 0.5
yalign 0.5

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: What's wrong with my code? Help a noob out.

#2 Post by Alex » Wed Sep 01, 2021 2:32 pm

Jumatsuga wrote:
Wed Sep 01, 2021 11:42 am
...However, the game simply ends and does not follow the "show" command for the image "phonetwo", even though the imagebutton works just fine. What am I doing wrong?...
If you don't have any code after 'show phonetwo' then game actually showing you this image, but ends the same moment. Add some code, like

Code: Select all

    show phonetwo:
        xalign 0.5
        yalign 0.5
    "?!"

Post Reply

Who is online

Users browsing this forum: No registered users