Ren'Py Imagebutton/imagemap/screen for stats [SOLVED]

Kthulian

www.kthuliangames.com
Game Developer
Apr 27, 2018
972
7,324
Hello everybody.
So I want to implement a Stats page on Ataegina and I need your help and opinions on the best way to do it.
Right now I have what is shown in the image below (without the heart) I created a screen (The skills and gold), then I tell the game to show the screen so it is always present, unless another screen(ex. maps) is displayed, so the player can see his stats all the time.

What I want is that this screen, the heart on the right to be more specific, to be clickable all the time, even during conversations (it doesn't have to appear when on other screens ex. traveling, maps) When clicked it shows another screen that will have some other values/stats and a button ("back") to close that screen and return to where you left.

My biggest issue is having the heart fixed on the screen all the time, I know how to do it if you are on a fixed place or on another imagemap with clickable stuff, but I wanted to have it even during conversations, like the action performed by the mouse right click on Ren'py, that shows the game menu.

Thank you all

297168
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,565
7,378
What you need to do is to create a Ren'py screen that contains just the heart (or the heart plus anything else you want showing all the time) and then just do
Code:
show screen my_heart_screen
at the beginning of your game.

This will cause this screen to be displayed at all times, even on top of conversation screens. If you're using other screens and need the heart to be in front of them, you can use the "z order" feature to force the heart screen farther forward.

The heart button in the heart screen would then show your stats screen. Important - your stats screen should be modal (i.e. have a "modal True" in it) so that clicks while that screen is up don't advance the conversation. Have another button inside your stats screen that hides the stats screen so people can go back to advancing the plot.
 
  • Like
Reactions: Kthulian

Kthulian

www.kthuliangames.com
Game Developer
Apr 27, 2018
972
7,324
Hello @Rich, thank you for you answer, that's not exactly the problem I have. I'm not sure how to ask.


* Edit* just figured out!! I was not using de 'action' correctly, went to look how the GUI itself worked and found how to do it.
Also found about Whores of Thrones from you sig,Thanks
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,565
7,378
Hello @Rich, thank you for you answer, that's not exactly the problem I have. I'm not sure how to ask.


* Edit* just figured out!! I was not using de 'action' correctly, went to look how the GUI itself worked and found how to do it.
Also found about Whores of Thrones from you sig,Thanks
OK, sorry I misinterpreted, but glad you got it sorted.

I'm "just" the programmer on WoT, btw - uber-credit to @FunFiction and Sihil for the hard work on the renders and script. :) (Getting close to the next release on that, however.)
 

Kthulian

www.kthuliangames.com
Game Developer
Apr 27, 2018
972
7,324
OK, sorry I misinterpreted, but glad you got it sorted.

I'm "just" the programmer on WoT, btw - uber-credit to @FunFiction and Sihil for the hard work on the renders and script. :) (Getting close to the next release on that, however.)
No prob (y) And great work on WoT, I'll be keeping an eye for it