[solved] Imagemap with fade?

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
Joey
Regular
Posts: 123
Joined: Tue Aug 02, 2011 4:51 am
Projects: Water's Edge
Organization: Etoranze
Contact:

[solved] Imagemap with fade?

#1 Post by Joey » Tue Nov 08, 2011 1:17 am

This is such a noobish question but I can't find the answer (if I missed it, I'm sorry! U_U) anywhere ;A;

How do you show an imagemap with a Fade transition? The only thing I could think of was appending "with Fade" at the end of the imagemap thing, but it didn't work >>; The transition from scene to map looks very jarring otherwise because I'm not using a button to bring up the map.

Code: Select all

label map_location1:
    $ location1 = renpy.imagemap("interface/map_0_nml.png", "interface/map_0_hov.png", [
                           (787, 45, 955, 158, "okujo"),
                           (72, 158, 304, 273, "ongakushitsu"),
                           (304, 158, 512, 273, "1nenkyo"),
                           (214, 273, 411, 414, "2nenkyo"),
                           (697, 273, 886, 414, "toire"),
                           (72, 414, 286, 581, "3nenkyo"),
                           (697, 414, 955, 581, "shokuin"),
                           (364, 581, 586, 699, "hoken"),
                           (697, 581, 955, 699, "getabako")
                          ])
    if location1 == "3nenkyo":
        jump a_3nenkyo
    if location1 == "hoken":
        jump a_hoken
    if location1 == "2nenkyo", "1nenkyo", "ongakushitsu":
        jump a_other
Many thanks in advance!
Last edited by Joey on Tue Nov 08, 2011 4:37 am, edited 1 time in total.
Image
Image (devblog) || devtwitter | devtumblr

User avatar
Soraminako
Veteran
Posts: 277
Joined: Sun Sep 04, 2011 1:36 am
Projects: A thingie without a title. With messy code.
Contact:

Re: Imagemap with fade?

#2 Post by Soraminako » Tue Nov 08, 2011 3:00 am

I'm under the impression it's not possible to show an imagemap with a transition. (I could be wrong. ^^; )

What I do, and have also seen other people doing too, is to have an image that's exactly like your imagemap, and load that as a scene with that transition, immediately before the imagemap.

The result will be that it will trick the player's eye into thinking the imagemap loaded with a transition, since immediately after the image is displayed it will show the imagemap instead, and they're identical so it will be seamless.
As a result, it looks much prettier overall than just having an imagemap showing up with no transition. :)
(I drew my avatar especially to express the scary feeling I get from the code as I type it... XD)

User avatar
Joey
Regular
Posts: 123
Joined: Tue Aug 02, 2011 4:51 am
Projects: Water's Edge
Organization: Etoranze
Contact:

Re: Imagemap with fade?

#3 Post by Joey » Tue Nov 08, 2011 4:37 am

Thanks a bunch, the trick looks great! x)

It's a little troublesome, but I guess my problem is solved~~ B)
Image
Image (devblog) || devtwitter | devtumblr

Post Reply

Who is online

Users browsing this forum: No registered users