Permanent Overlay

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
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Permanent Overlay

#1 Post by Mirrodin »

Hi !

First of all, i need to thank you all for the big content on this forum.
I started my renpy adventure last month and this website help me a lot and my project is really advanced.

What is my problem :
I need to write a permanent overlay for the player's number of coin.
until now, i success with i guess to much code.

Can u just show me with a little exemple how having an indication of amount of gold permanently in the game ?

excuse me for the language, english is not my native language.

User avatar
SuperbowserX
Veteran
Posts: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Re: Permanent Overlay

#2 Post by SuperbowserX »

You want to use a screen.

viewtopic.php?f=8&t=10200

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2402
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Permanent Overlay

#3 Post by Ocelot »

Code: Select all

screen gold_overlay():
    # Add real displayables showing your gold
     text 'You have [gold_amount] gold' align (0.95, 0.05)

init python:
    config.overlay_screens.append('gold_overlay')
< < insert Rick Cook quote here > >

User avatar
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Re: Permanent Overlay

#4 Post by Mirrodin »

@SuperbowserX : thanks to ure response but it doesnt work.

@Ocelot : Thanks, its exactly what i need. i will build ahead.

love u guys.

User avatar
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Re: Permanent Overlay

#5 Post by Mirrodin »

Just a thing,
the overlay doesnt work when i'm in imagemap i guess its standart.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2402
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Permanent Overlay

#6 Post by Ocelot »

Add zorder 100 to the gold screen to force it above all other screens.
< < insert Rick Cook quote here > >

User avatar
Mirrodin
Regular
Posts: 114
Joined: Sun Mar 19, 2017 2:56 pm
Contact:

Re: Permanent Overlay

#7 Post by Mirrodin »

Just perfect.
Thank u so much.

Post Reply

Who is online

Users browsing this forum: DewyNebula