I thought adding the same tag to screens made them disappear when I show another one? [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
kafkaontheshore
Newbie
Posts: 22
Joined: Thu Apr 22, 2021 8:57 am
Contact:

I thought adding the same tag to screens made them disappear when I show another one? [Solved]

#1 Post by kafkaontheshore »

I have a screen for a map and when I show it, I want the hotspots of other screens to disappear.
I cannot call the map when the player clicks on the map icon because I called a character already (because you are supposed to either talk to him or leave the place over the map). Also the screen of the map does not cover the complete screen, which is why you can see a bit of the background, which is fine but you also see the map icon and you can still click on it and also the character (you do not see him anymore though). I added the same tag to all of the screens because I have read that due to this, they would replace each other. I think that I misunderstood something there...

I hope that I explained my problem well...
Thank you for your time!
Last edited by kafkaontheshore on Fri Jun 04, 2021 5:54 am, edited 1 time in total.

adrix89
Regular
Posts: 72
Joined: Fri Jun 26, 2009 12:15 pm
Contact:

Re: I thought adding the same tag to screens made them disappear when I show another one?

#2 Post by adrix89 »

You want to use your own layer for this and use the renpy.scene(layer='your layer') to clear it.
It's equivalent to having a bunch of hide statements for everything on that layer.
Tags do not work that well when you have multiple stuff to show at the same time, it can only replace one thing with another.

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: I thought adding the same tag to screens made them disappear when I show another one?

#3 Post by zmook »

I think you do have to use ShowMenu() instead of Show() to get screens to replace each other. If you could post some of your code we might be able to help in more detail. Possibly also a screenshot would help.
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

kafkaontheshore
Newbie
Posts: 22
Joined: Thu Apr 22, 2021 8:57 am
Contact:

Re: I thought adding the same tag to screens made them disappear when I show another one?

#4 Post by kafkaontheshore »

Sorry for the late reply and thank you for your time!
I must admit that I did not quite understand the layers thing. So I tried to fix my problem with zorder, modal True and tag map. As a result, all of my problems were almost solved:
The map screen is closer to the player and has to be clicked, you cannot interact with characters anymore.
Also the icons disappear because of the tag.
Due to this the opposite also works:

action Hide("map", dissolve), Show("map_icon", dissolve)

This might be too complicated. :p The only problem I have now is that while you talk with characters you can leave the place because the icons do not disappear while the say screen is shown...

The ShowMenu() thing might later still be interesting because I have to soon implement something like a diary. I will look into it.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]