[SOLVED] Struggling with the text box moving downwards after calling an image map

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
User avatar
heartfragment
Regular
Posts: 94
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

[SOLVED] Struggling with the text box moving downwards after calling an image map

#1 Post by heartfragment » Tue Feb 18, 2020 4:01 pm

Hi folks! I'm struggling with something here. I've tried looking for a fix but I couldn't find anything myself; maybe I wasn't searching the right keywords though, and in that case I apologize.

The problem I'm having is that when a screen is called for an image map, the text box is normal and functional for everyone except the main character. When she speaks, her name disappears and the text box moves downwards a bit. I've been trying to examine what might have done this but so far I haven't found anything that fixes it.

The main character's text box works perfectly fine with every other scene, though; its only after calling an image map.

This is what it looks like:

NORMAL:
Image

BUGGED:
Image

This is probably a really dumb question and I apologize for that as well! Thank you so much for any help, though!
Last edited by heartfragment on Thu Feb 20, 2020 11:37 am, edited 1 time in total.
Work in progress:
Image

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

Re: Struggling with the text box moving downwards after calling an image map

#2 Post by Alex » Tue Feb 18, 2020 4:42 pm

Could you provide some code lines, like character declaration and part with normal text, imagemap calling and bugged text.

User avatar
heartfragment
Regular
Posts: 94
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Struggling with the text box moving downwards after calling an image map

#3 Post by heartfragment » Tue Feb 18, 2020 4:50 pm

Alex wrote:
Tue Feb 18, 2020 4:42 pm
Could you provide some code lines, like character declaration and part with normal text, imagemap calling and bugged text.
Yes for sure! Sorry I didn't include that in the first post; I wasn't sure what part of the code could be bugged.

Character declaration:

Code: Select all

    $ x = Character("[povname]", show_two_window=True)
    $ povname = ""
    $ pov = DynamicCharacter("Xani", color="#000000", show_two_window=True)
 
example of Normal text:

Code: Select all

    show xani annoyed1 at myleft
    x "Just tell me so that I can go to my room."
    f "I wish I could, girl. I wish I could."
    "He shakes his head, letting out a sigh."
    f "You'll have to make something up for your assignment."
    show xani neutral1 at myleft
    x "Fine."
    "It wasn't like it mattered much to you either way."
example of Bug text:

Code: Select all

    show xani surprised at myleft
    x "No! Shannon, this isn't your fault!"
    show shannon neutral2 at myright
    s "Maybe. But I still feel bad."
    show shannon neutral1 at myright
    s "I'm sorry, I wish I could do something to help. Are you in pain?"
    "Truth be told, you are. But it is mostly a dull ache, probably because of whatever medication they're giving you through your IV."
    "But you don't want to let Shannon know. She'd just make a big deal out of it and you'd feel guilty."
    show xani happy1 at myleft
    x "Nah, I'm fine. Don't worry about it."
the image map screen code:

Code: Select all

screen routechoose:
    imagemap:
        ground "GUI/imagemap.png"
        hover "GUI/imagemaphover.png"

        hotspot (166,48,368,321) action Jump("shannonroute")
        hotspot (545,50,349,305) action Jump("cliveroute")
        hotspot (894,242,323,402) action Jump("kayroute")
        hotspot (1241,36,336,372) action Jump("jasperroute")
the image map called in game:

Code: Select all

label choicesroute:
    "Amidst the blackness you feel yourself floating, a reprieve from the pain. Before you appears... what is this?"
    "Colors...? Shapes.......?"
    call screen routechoose with fade
    "They each carry a different sensation."

label shannonroute:
    "This one feels happy... warm. It feels like its calling to you."
    "You sense that whatever this shape contains, at the center of it all is love."
    "A soft love. Gentle. But with something... underneath that?"
    "Will you grab this one?"
    
    menu:
        "Yes":
            ".........."
            jump shannon
        "No":
            "Very well then."
            jump choicesroute
If anything else is needed please feel free to let me know. Thank you in advance!
Work in progress:
Image

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

Re: Struggling with the text box moving downwards after calling an image map

#4 Post by Alex » Tue Feb 18, 2020 5:31 pm

Well, I was hoping that you post the code that related with the pics you've posted... Anyway, try not to call a screen but just show it. And set the modal property of the screen to True (to force player interact with this screen only), and add an action to hide this screen when choice made. Like

Code: Select all

screen routechoose():
    modal True
    imagemap:
        ground "GUI/imagemap.png"
        hover "GUI/imagemaphover.png"

        hotspot (166,48,368,321) action [Jump("shannonroute"), Hide("routechoose")]
Any differences in textbox behaviour?

User avatar
heartfragment
Regular
Posts: 94
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Struggling with the text box moving downwards after calling an image map

#5 Post by heartfragment » Tue Feb 18, 2020 5:38 pm

Alex wrote:
Tue Feb 18, 2020 5:31 pm
Well, I was hoping that you post the code that related with the pics you've posted... Anyway, try not to call a screen but just show it. And set the modal property of the screen to True (to force player interact with this screen only), and add an action to hide this screen when choice made. Like
...
Sorry about that - my bad. The one I posted as an example for the normal/unbugged version was taken from that moment, but here's more script from the bugged area that is from the exact moment for the picture I gave as well.

Code: Select all

    f "You're at the hospital. You were badly wounded. Do you remember anything that happened that led up to this?"
    show xani worried2 at myleft
    x "Yeah... I remember."
Everything after the imagemap gets bugged for the main character's text though, and I can't figure out why that's the only thing bugged. No other character experiences this issue and I'm at a loss ^^; Unfortunately changing the code to what you had listed didn't help either. Thank you so much though - I'm really appreciative of your assistance!
Work in progress:
Image

User avatar
gas
Miko-Class Veteran
Posts: 704
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Struggling with the text box moving downwards after calling an image map

#6 Post by gas » Tue Feb 18, 2020 5:52 pm

Tried to DEFINE character with... define?
It's the only thing I can spot.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll be not notified about.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
heartfragment
Regular
Posts: 94
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Struggling with the text box moving downwards after calling an image map

#7 Post by heartfragment » Tue Feb 18, 2020 5:55 pm

gas wrote:
Tue Feb 18, 2020 5:52 pm
Tried to DEFINE character with... define?
It's the only thing I can spot.
Oh my gosh, you are totally right. I had added an option for people who played the previous version of the demo to skip directly to the new content and forgot to put in a spot to define the name if you select that option. ^^; I can't believe I missed something so silly. I've been trying to fix this for like 5 hours lmao thank you so much!
Work in progress:
Image

Post Reply

Who is online

Users browsing this forum: No registered users