[SOLVED]Display on text dialogue

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
isobellesophia
Miko-Class Veteran
Posts: 697
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

[SOLVED]Display on text dialogue

#1 Post by isobellesophia » Mon Nov 18, 2019 10:05 am

Hello everyone.

I had my code from my playtime, aka the time of playing which is Imperf3kt's code for me.

Code: Select all

init python:
    import time

## game runtime counter
default playtime = 0

init 2 python:

    def save_playtime(d):
        renpy.store.playtime += renpy.get_game_runtime()
        renpy.clear_game_runtime()
        d["playtime"] = renpy.store.playtime

    config.save_json_callbacks = [save_playtime]
What i want is.. it worked well, but i want it to display in dialogue like..

Code: Select all

m "You played [playtime] to finish the game."
Anyone can help would be great and thanks, or.. tell me that i did right about what i want to happen.
Last edited by isobellesophia on Tue Nov 19, 2019 7:21 am, edited 1 time in total.
I am a friendly user, please respect and have a good day..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

User avatar
isobellesophia
Miko-Class Veteran
Posts: 697
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: Display on text dialogue

#2 Post by isobellesophia » Tue Nov 19, 2019 7:21 am

Oh nvm, i already knew how. Mrked as solved.
I am a friendly user, please respect and have a good day..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

Post Reply

Who is online

Users browsing this forum: deltadidirac, meyaoi, Newnewbie