using a variable ground in a imagemap

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
Dr_arell
Regular
Posts: 70
Joined: Sun Feb 23, 2020 11:24 pm
Deviantart: DarellArt
Contact:

using a variable ground in a imagemap

#1 Post by Dr_arell »

simple question

how can i set a ground linked to a function while creating a imagemap, i'm trying to make a screen that shows different images and when clicked it expands the image, kinda full screen.

heres the code im using

Code: Select all

[color=#BF40BF]screen chat_picture_sent(nick=None, avatar=None, photo=None,):

            if photo != None:
                hbox:
                    spacing 15
                    add avatar

                    frame:
                        background  "#FFFFFF"
                        vbox:
                            add photo
                            text nick color "#000000" size 25
                            imagemap:
                                ground "" # <--- trying to use photo function here, not working
                                hotspot(4, 7, 403, 1070) action Jump("gwens_living_room")
the idea is to make a general imagemap, that can be reused just assigning a different image.

$ registry.send_picture(nick="Developer", avatar="xd.png", photo="xd2.png",)

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: using a variable ground in a imagemap

#2 Post by gas »

Imagemap is not the best thing to use, an imagebutton look what you want to use instead.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

Post Reply

Who is online

Users browsing this forum: No registered users