Image map Dead Spots?

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
CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Image map Dead Spots?

#1 Post by CellHG »

Is there any way to make a dead spot within an image map? iv been looking into it and the only tutorial I can find is in a language I don't understand :P

So basically, I have this computer:

Image

Bit crappy but get's the job done :P

I basically want to make it so when I'm using an image map, someone clicks the computer and a menu pop's up.

However, I don't want it to do this when they click next to the image ( basically the transparent background), if you get what I mean :P

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Image map Dead Spots?

#2 Post by Remix »

I think all image maps use rectangular hotspots.

I would advise looking at ImageButton and focus_mask which makes only non transparent pixels sensitve...
Frameworks & Scriptlets:

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

Re: Image map Dead Spots?

#3 Post by philat »

Or you can use alpha (https://www.renpy.org/doc/html/screens.html#imagemap ) although that should be True by default.

CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Re: Image map Dead Spots?

#4 Post by CellHG »

philat wrote: Sat Jul 22, 2017 12:45 pm Or you can use alpha (https://www.renpy.org/doc/html/screens.html#imagemap ) although that should be True by default.
Might sound like a noob question, but how do I use the alpha & enable it? like where do I put it, it's something iv never understood about the documentation when it shows the name & description of something, but not how to use it o.0

Like would I put alpha = "true" within the image map code? as iv tried that and failed :P

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Image map Dead Spots?

#5 Post by Milkymalk »

You write it as an argument for the imagemap. Like so:

Code: Select all

imagemap:
    alpha True
    # other arguments
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Re: Image map Dead Spots?

#6 Post by CellHG »

Milkymalk wrote: Sat Jul 22, 2017 4:55 pm You write it as an argument for the imagemap. Like so:

Code: Select all

imagemap:
    alpha True
    # other arguments
Iv done that, but when I hover outside the "hover" image, the hover image flickers, even though I'm outside the overlay image o.0

This is the code I have if it helps:

Code: Select all

screen bedroom:
    imagemap:
        alpha True
        ground "Room_Main_Imagemap.png"
        hover "Room_Main_Imagemap_h.png"

        hotspot (134, 548, 219, 244) clicked Jump("side_table")
        hotspot (334, 429, 637, 267) clicked Jump("bed")
        hotspot (1055, 387, 152, 98) clicked Jump("dressser")
I would add the hover image but no image host will let me upload it for some reason o.0

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Image map Dead Spots?

#7 Post by trooper6 »

I recommend making that computer an imagebutton.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Re: Image map Dead Spots?

#8 Post by CellHG »

trooper6 wrote: Sat Jul 22, 2017 5:20 pm I recommend making that computer an imagebutton.
Where would I but that in the code :P

Also, I'm using multiple hovers on 1 image, should I be doing that? it's what It said to do on the tutorial :P

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Image map Dead Spots?

#9 Post by trooper6 »

You should check out the Imagebutton Cookbook tutorial for more details on how to deal with imagebuttons. Check it out...but check out the fixed version that I made rather than the original version: viewtopic.php?p=455107#p455107
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

CellHG
Regular
Posts: 61
Joined: Fri May 05, 2017 3:01 pm
Contact:

Re: Image map Dead Spots?

#10 Post by CellHG »

trooper6 wrote: Sat Jul 22, 2017 5:45 pm You should check out the Imagebutton Cookbook tutorial for more details on how to deal with imagebuttons. Check it out...but check out the fixed version that I made rather than the original version: viewtopic.php?p=455107#p455107
The issue I'm having with that is it seems to be to open a screen? am I right? I don't want it to go to a screen, once someone click's it I want it to jump to another label, iv tried:

screen bedroom:
imagebutton auto "gui/Room_Bed_Imagemap_h.png" clicked Jump("bed")

but that's in the script file, I don't know how to show it from the screens file o.0

I'm just to noobish xD

Post Reply

Who is online

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