How do I make an imagemap screen without a textbox? (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
User avatar
Shades of Night
Regular
Posts: 35
Joined: Fri Feb 27, 2015 7:16 pm
Tumblr: serilyn
Deviantart: shadesofnight
Location: Bag of holding #396
Contact:

How do I make an imagemap screen without a textbox? (SOLVED)

#1 Post by Shades of Night »

I have or want to have my game set up so it starts with a line of dialog, then goes to an imagemap screen where the player makes a choice by clicking on hotspots, and one of those choices leads to another line of dialog, then goes to another imagemap screen with more hotspots to click on.

So it goes:
-Dialog
-imagemap: Choice 1, choice 2
-dialog
-imagemap2: choice 1, choice 2

I have a few problems:
1. Instead of the first dialog window going away when the screen moves to the imagemap, it moves onto the next line of dialog in the script file...
Which leads to another problem, clicking anywhere that isn't a hotspot just keeps advancing dialog rather than just doing nothing.
2. The hotspots do work if clicked on... but when it flicks back to the dialog with its own background the imagemap stays on top and doesn't go.

So how do I stop it from moving onto the next line of dialog automatically and/or via clicking while on the imagemap screen?
And how do I hide an imagemap after a choice from it has been made so it doesn't stick around on the next screen?

This is the code I'm using...
In the script.rpy file:

Code: Select all

label start1:
    scene tank
    c "Welcome speech"
    show screen custom
    
label start1a:
    c "Choice 1. Next."
    jump name0
         
label start1b:
    show creation
    c "Make another choice."
    show screen creation

label start1c:
    c "Choice made. Next."
    jump name0
                    
label name0:
    c "Bla bla bla.
In another file for different new screens:

Code: Select all

screen custom:
    imagemap:
        ground "TTBtempS1a.png"
        idle "ground.png"
        hover "TTBtempS1b.png"
        alpha False
        
        #choice 1
        hotspot (581, 254, 381, 143) clicked Jump("start1a")
        #choice 2
        hotspot (583, 400, 379, 118) clicked Jump("start1b")

screen creation:
    imagemap:
        ground "TTBtempS2.png"
        idle "ground.png"
        hover "TTBtempS2a.png"
        alpha False
        
        #done
        hotspot (583, 400, 379, 118) clicked Jump("start1c")
Last edited by Shades of Night on Fri Mar 06, 2015 6:52 am, edited 1 time in total.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: How do I make an imagemap screen without a textbox?

#2 Post by xavimat »

use call screen instead of show screen

Doc: http://renpy.org/doc/html/screens.html# ... statements
show screen
Screens shown in this way are displayed until they are explicitly hidden. This allows them to be used for overlay purposes.

call screen
The call screen statement shows a screen, and then hides it again at the end of the current interaction.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Shades of Night
Regular
Posts: 35
Joined: Fri Feb 27, 2015 7:16 pm
Tumblr: serilyn
Deviantart: shadesofnight
Location: Bag of holding #396
Contact:

Re: How do I make an imagemap screen without a textbox?

#3 Post by Shades of Night »

Thank you! <3 I knew it would probably be something simple, I just didn't know how to word it so I could search properly.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]