Help!!! Problems with image maps [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
Ronyavalentine
Newbie
Posts: 5
Joined: Sat Nov 28, 2015 3:18 pm
Contact:

Help!!! Problems with image maps [SOLVED]

#1 Post by Ronyavalentine » Sat Nov 28, 2015 3:24 pm

So, I've been having a problem with imagemaps for AGES now, without being able to make them work properly. I'm trying to make simple navigation-menus in-game as well as customize menus and such, but whenever I try to work around things, only the ground image shows up and won't let the player interact with the hotspots AT ALL. I've tried working according to tutorials, old and new, but the newest I've found are at least three years old and I feel like they MAY be outdated. Have you had this problem before? If so, how did you overcome it? Answers and tips would be greatly appreciated!!!


EDIT: OK PROBLEM SOLVED THANK YOU SO MUCH
Last edited by Ronyavalentine on Sun Nov 29, 2015 8:13 am, edited 2 times in total.

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Help!!! Problems with imagemaps

#2 Post by Jae » Sat Nov 28, 2015 4:07 pm

You should probably show your code here, otherwise people can only guess what went wrong rather than actually see it.

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

Re: Help!!! Problems with imagemaps

#3 Post by philat » Sat Nov 28, 2015 7:55 pm

The tutorials in the cookbook are not outdated. Imagemaps just have not changed in a long time.

Ronyavalentine
Newbie
Posts: 5
Joined: Sat Nov 28, 2015 3:18 pm
Contact:

Re: Help!!! Problems with imagemaps

#4 Post by Ronyavalentine » Sun Nov 29, 2015 7:13 am

Ahhh gosh sorry ofc I should've included the code !!! I hope this is the correct way to put it??

Code: Select all

screen fightscreen:
   imagemap:
        ground "Fight_screenIDLE.png"
        idle "Fight_screenIDLE.png"
        hover "Fight_screenHOVER.png"
        
        hotspot (26.0, 122, 351.0, 93) clicked Jump("attack")
        hotspot (28.0, 315, 344.0, 86) clicked Jump("cheap_shot")
        hotspot (28.0, 504, 345, 93) clicked Jump("verbal_hit")
        hotspot (898.0, 123, 348.0, 92) clicked Jump("fight_item")
        hotspot (901.0, 313, 350.0, 93) clicked Jump("opponent_info")
        hotspot (910.0, 504, 350.0, 94) clicked Jump("free_hit")
I've also tried including selected_idle and selected_hover, and used 'actions' when customizing menus and such. I'm probably making some silly mistake which is easy to fix and I really hope that's the case gosh. Once again, the problem is only the ground image displaying and not letting me/the player interact with the hotspots.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Help!!! Problems with imagemaps

#5 Post by Zetsubou » Sun Nov 29, 2015 7:29 am

Change "clicked" to "action".
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

Ronyavalentine
Newbie
Posts: 5
Joined: Sat Nov 28, 2015 3:18 pm
Contact:

Re: Help!!! Problems with imagemaps

#6 Post by Ronyavalentine » Sun Nov 29, 2015 7:59 am

Zetsubou wrote:Change "clicked" to "action".
I tried this; Still only getting the ground image without working hotspots.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Help!!! Problems with imagemaps

#7 Post by Zetsubou » Sun Nov 29, 2015 7:59 am

You're changing the wrong part.
Change "clicked", not "Jump".
Your traceback has 'clicked action("attack")'. The syntax should be 'action Jump("attack")'.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

Ronyavalentine
Newbie
Posts: 5
Joined: Sat Nov 28, 2015 3:18 pm
Contact:

Re: Help!!! Problems with imagemaps

#8 Post by Ronyavalentine » Sun Nov 29, 2015 8:03 am

Zetsubou wrote:You're changing the wrong part.
Change "clicked", not "Jump".
Your traceback has 'clicked action("attack")'. The syntax should be 'action Jump("attack")'.

I realized I was doing the wrong thing the moment I posted the reply to you haha. I tried this too, but still no luck. Ground screen, no working hotspots.

Code: Select all

screen fightscreen:
   imagemap:
        ground "Fight_screenIDLE.png"
        idle "Fight_screenIDLE.png"
        hover "Fight_screenHOVER.png"
        
        hotspot (26.0, 122, 351.0, 93) action Jump("attack")
        hotspot (28.0, 315, 344.0, 86) action Jump("cheap_shot")
        hotspot (28.0, 504, 345, 93) action Jump("verbal_hit")
        hotspot (898.0, 123, 348.0, 92) action Jump("fight_item")
        hotspot (901.0, 313, 350.0, 93) action Jump("opponent_info")
        hotspot (910.0, 504, 350.0, 94) action Jump("free_hit")

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Help!!! Problems with imagemaps

#9 Post by Zetsubou » Sun Nov 29, 2015 8:10 am

Hm, the only thing I can think of there would be the ".0" for the hotspot coordinates.
I don't know if hotspots differentiate between floats and ints, but it can't hurt to try.
ie. change "26.0" to "26", "351.0" to "351", and so on, then see if that makes a difference.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

Ronyavalentine
Newbie
Posts: 5
Joined: Sat Nov 28, 2015 3:18 pm
Contact:

Re: Help!!! Problems with imagemaps

#10 Post by Ronyavalentine » Sun Nov 29, 2015 8:12 am

Zetsubou wrote:Hm, the only thing I can think of there would be the ".0" for the hotspot coordinates.
I don't know if hotspots differentiate between floats and ints, but it can't hurt to try.
ie. change "26.0" to "26", "351.0" to "351", and so on, then see if that makes a difference.

AAHHHH it worked ohmygosh it was that simple thank you so much!! I just copied the coordinates straight off the developer-screen so I figured the digits would be necessary haha. Thank you!! It's working well now!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], _ticlock_