Adding an image on top of an 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
User avatar
Lezalith
Regular
Posts: 82
Joined: Mon Dec 21, 2015 6:45 pm
Contact:

Adding an image on top of an imagemap

#1 Post by Lezalith » Sun Jul 10, 2016 6:02 pm

Hey everyone,
I'm going crazy over a script of mine. I somehow solved it in my other work, now I have the same problem and I have no bloody idea how I solved it back then.
I have an imagemap. In that imagemap, there are these lines of code:

Code: Select all

        showif MorningSelected == 1 and AfternoonSelected == 1:  #Condition
            add "teachingButton.png" at teachingButtonPosition #Add an image of a button 
            hotspot (1064, 199, 194, 99) action Jump("TeachingDoneMorning"),Hide("study") #Add a hotspot corresponding to the image added
When the condition is met, an image and a hotspot are added. Right now however, my imagemap is on top of the added image, so the image itself is not visible.
How do I make it so the image is on top of the imagemap instead?
Thanks for help people :)

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

Re: Adding an image on top of an imagemap

#2 Post by gas » Sun Jul 10, 2016 8:50 pm

add a zorder statement (anyway I don't see the point using an hotspot when you can simply add a button).
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

User avatar
Lezalith
Regular
Posts: 82
Joined: Mon Dec 21, 2015 6:45 pm
Contact:

Re: Adding an image on top of an imagemap

#3 Post by Lezalith » Mon Jul 11, 2016 7:05 am

I tried that, but it says that "zorder" cannot be used with the "add" statement.

User avatar
Lezalith
Regular
Posts: 82
Joined: Mon Dec 21, 2015 6:45 pm
Contact:

Re: Adding an image on top of an imagemap

#4 Post by Lezalith » Mon Jul 11, 2016 3:25 pm

Bump

User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Adding an image on top of an imagemap

#5 Post by Kia » Mon Jul 11, 2016 3:42 pm

put this code in some line after your imagemap code, in screen code, objects in lower lines cover the objects in the lines above them

User avatar
Lezalith
Regular
Posts: 82
Joined: Mon Dec 21, 2015 6:45 pm
Contact:

Re: Adding an image on top of an imagemap

#6 Post by Lezalith » Mon Jul 11, 2016 4:24 pm

I decided to go "screw everything" and just added a button like gas suggested.
It's just a bit annoying, seeing how something that worked before doesn't work now and you don't know why.

Post Reply

Who is online

Users browsing this forum: Google [Bot], _ticlock_