Imagemap Variations?

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
peroxidehead
Newbie
Posts: 20
Joined: Thu Mar 13, 2014 7:29 am
Projects: Cat's Cradle
Tumblr: nekomacradle
Contact:

Imagemap Variations?

#1 Post by peroxidehead »

I'm really new to making image maps so I apologize in advance.
So I have this imagemap wherein the player chooses where they want to go. And I want to add icons of the character/s who're currently in that area to look like this :
Image

However, my concern is that I'll be using this imagemap a lot of times and it's not like the characters will always be in the same place. I initially planned on just making different imagemaps for each time I'll be using it. But I feel like doing that will be really tedious. And so I was wondering if there's another way around this? I would really appreciate any help on this. :D

User avatar
Iylae
Regular
Posts: 73
Joined: Sat Jan 09, 2016 6:57 am
Location: Cornwall, UK
Contact:

Re: Imagemap Variations?

#2 Post by Iylae »

Is there any reason why you don't use images with very specific xalign and yalign?

I can assume that you couldn't then just click "through" these to the imagemap behind, or if you can, I don't know the controlling parameter.
Image
  If we are what we repeatedly do, then good coding is not an act, but a habit

User avatar
peroxidehead
Newbie
Posts: 20
Joined: Thu Mar 13, 2014 7:29 am
Projects: Cat's Cradle
Tumblr: nekomacradle
Contact:

Re: Imagemap Variations?

#3 Post by peroxidehead »

Iylae wrote:Is there any reason why you don't use images with very specific xalign and yalign?

I can assume that you couldn't then just click "through" these to the imagemap behind, or if you can, I don't know the controlling parameter.
I'm , er, really new to imagemaps? I kind of thought that imagemaps works as one whole clunk of image. I didn't actually think that I could use specific images instead. :shock: I'll be sure to try it out this way though. Thank you for taking the time to answer my question! :D

philat
Eileen-Class Veteran
Posts: 1926
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Imagemap Variations?

#4 Post by philat »

Assuming you're using a screen, the imagemap and the added images should be separate.

Code: Select all

screen schoolmap:
    imagemap:
        # hotspots and blah blah here
    if condition_fulfilled_here:
        add "character one" xpos x ypos y
The above is concept only: how you will keep track of which characters are where and add images appropriately is a matter for you to refine to your liking. I'm just pointing you to the basic premise -- check whether a character is at a place, then add the image with specific coordinates.

User avatar
peroxidehead
Newbie
Posts: 20
Joined: Thu Mar 13, 2014 7:29 am
Projects: Cat's Cradle
Tumblr: nekomacradle
Contact:

Re: Imagemap Variations?

#5 Post by peroxidehead »

philat wrote:Assuming you're using a screen, the imagemap and the added images should be separate.

Code: Select all

screen schoolmap:
    imagemap:
        # hotspots and blah blah here
    if condition_fulfilled_here:
        add "character one" xpos x ypos y
The above is concept only: how you will keep track of which characters are where and add images appropriately is a matter for you to refine to your liking. I'm just pointing you to the basic premise -- check whether a character is at a place, then add the image with specific coordinates.
Thanks! I think I might do this instead of what I had initially planned , though I'll need to study more on imagemaps. :D

Post Reply

Who is online

Users browsing this forum: DewyNebula, Google [Bot], sittingox, voluorem