Imagemaps should have same size but don't [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
DapNix
Regular
Posts: 52
Joined: Fri Mar 01, 2013 6:15 am
Contact:

Imagemaps should have same size but don't [SOLVED]

#1 Post by DapNix »

All of my imagemaps are set to be 90 by 90 pixels in size, but for some reason this happens:

Image

The distorted areas are the hotspots and for some reason, some of them split off into separate boxes, the one in the bottom left only has half of its supposed x-size. I feel like my code is haunted...
Even weirder, when I click a hotspot, the other ones mix around with size and all. It's really weird...

ETA: If anyone wants code, here's what it looks like:

Code: Select all

screen chrystelAlgan():
    tag menu
    imagemap:
        ground "bg/chrystelMenu.jpg"

        hotspot (65, 450, 90, 90): #50, 440, 75, 75
            action [SensitiveIf(Atk1.purchased == 0), ShowMenu('chrystelPurchaseAtk1')]
        hotspot (85, 270, 90, 90):
            action [SensitiveIf(Atk1.purchased == 1), ShowMenu('chrystelPurchaseAtk1')]
        hotspot (637, 60, 95, 95):
            action [SensitiveIf(Atk1.purchased == 4 or Sp1.purchased == 1), ShowMenu('chrystelPurchaseAtk1')]
        hotspot (445, 60, 90, 90):
            action [SensitiveIf(Atk1.purchased == 3), ShowMenu('chrystelPurchaseAtk1')]
        hotspot (225, 110, 90, 90):
            action [SensitiveIf(Atk1.purchased == 2), ShowMenu('chrystelPurchaseAtk1')]
        hotspot (325, 410, 90, 90):
            action [SensitiveIf(Atk1.purchased > 0 and Hp1.purchased == 0), ShowMenu('chrystelPurchaseHp1')]
So as you can see, all of them except the one in the upper right corner should be the same size. But for some reason they don't.
Last edited by DapNix on Sun Mar 01, 2015 1:23 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Imagemaps should have same size but don't

#2 Post by PyTom »

Did you delete the game/cache directory?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

DapNix
Regular
Posts: 52
Joined: Fri Mar 01, 2013 6:15 am
Contact:

Re: Imagemaps should have same size but don't

#3 Post by DapNix »

I did that just now, and it worked! Thank you so much I've been stuck on this issue for days now...

If possible, could you enlighten me as to how this problem happens?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Imagemaps should have same size but don't

#4 Post by PyTom »

Ren'Py uses file times to update the imagemap cache. For some reason, that doesn't work as well as I'd like.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Adabelitoo, Google [Bot]