Zoom in when selecting main menu imagemaps.

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
XenoStaR
Newbie
Posts: 8
Joined: Fri Jan 19, 2018 4:08 pm
Contact:

Zoom in when selecting main menu imagemaps.

#1 Post by XenoStaR »

So I am not sure if this is possible. I am using imagemaps for the main menu. The idea is that the main menu would be a world map and when you select options/load/about the map would zoom into a country and then the screen needed would appear, making the screens is easy enough but I have no idea how to use the transition to zoom in with the imagemaps.

This is how my menu screen looks at the moment, not sure if the transition/transform would be put here:

Code: Select all

screen main_menu():
    
    tag menu

    style_prefix "main_menu"

    frame:
        pass

        imagemap:
        
            idle "gui/map.png"
            hover "gui/map2.png"
            ground "gui/map3.png"
 
            hotspot (238,201,138,61) action Start()
            hotspot (238,280,134,61) action ShowMenu('load') 
            hotspot (559,334,180,73) action ShowMenu('preferences')
            hotspot (799,151,174,64) action ShowMenu('about')
            hotspot (970,533,196,76) action Quit('quit')
            

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Zoom in when selecting main menu imagemaps.

#2 Post by kivik »

Maybe try a list of actions? Not tested:

Code: Select all

action [Show("load_screen_country",transition=zoomin),ShowMenu('load)]
You'll need a timer on country screens to hide themselves. Not tested but something like this should work:

Code: Select all

screen load_screen_country:
    timer 5.0 action [Hide("load_screen_country"), Return("value")]
    add "load_screen_country.jpg"
Assuming you want the country to be the background of the screen you'd need to also add the background image to your menu screens as well.

XenoStaR
Newbie
Posts: 8
Joined: Fri Jan 19, 2018 4:08 pm
Contact:

Re: Zoom in when selecting main menu imagemaps.

#3 Post by XenoStaR »

Thanks for the reply, unfortunately it just holds on the load_screen_country for five seconds then starts then game, no zooming or going to the correct menu.

I'm thinking an animation may just be the best way to do it but thought it would be possible using the method you said.

Post Reply

Who is online

Users browsing this forum: Google [Bot]