Code so that the text does not appear in the history

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
Andredron
Miko-Class Veteran
Posts: 535
Joined: Thu Dec 28, 2017 2:37 pm
Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
Location: Russia
Contact:

Code so that the text does not appear in the history

#1 Post by Andredron » Mon Jun 20, 2022 12:24 am

Hi, everybody,

In the project, I have to use a crutch in the form of this code:

Code: Select all

label start:

    scene anim_01
    
    voice "voice/001.ogg"
    ger "bla-bla{nw}" 
    
    show anim_02
    ger "bla-bla{fast}" 
My problem is that when I call the history, I have the phrase displayed 2 times

There is no code for such a plan

Code: Select all

label start:

    scene anim_01
    
    voice "voice/001.ogg"
    ger "bla-bla{nw}" 
    
    $ disable_history = True
    
    show anim_02
    ger "bla-bla{fast}"
    
    $ disable_history = False
I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Help me to register in QQ International

Honest Critique

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

Re: Code so that the text does not appear in the history

#2 Post by Ocelot » Mon Jun 20, 2022 2:27 am

Code: Select all

"This will be recorded"

$ store._history = False

"This will be not"

$ store._history = True

"This line will be recorded again"

"This line will be immideately purged from History screen after recording it"
$ store._history_list.pop()
https://www.renpy.org/doc/html/history.html
https://www.renpy.org/doc/html/store_va ... r-_history
< < insert Rick Cook quote here > >

User avatar
Syrale
Regular
Posts: 99
Joined: Sun Oct 25, 2015 10:28 am
Completed: Robot Daycare, Deep Sea Valentine, Locke(d)
Projects: Artificial Selection, rei_carnation
itch: kigyo
Discord: kigyo#2564
Contact:

Re: Code so that the text does not appear in the history

#3 Post by Syrale » Mon Jun 20, 2022 6:12 am

An alternate solution that I tend to use is:

Code: Select all

label start:

    scene anim_01
    
    voice "voice/001.ogg"
    ger "bla-bla{nw}" 
    
    show anim_02
    extend "" 
That way you don't need to deal with the history at all.

User avatar
Andredron
Miko-Class Veteran
Posts: 535
Joined: Thu Dec 28, 2017 2:37 pm
Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
Location: Russia
Contact:

Re: Code so that the text does not appear in the history

#4 Post by Andredron » Mon Jun 20, 2022 3:27 pm

Guys, thank you so much!
I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Help me to register in QQ International

Honest Critique

Post Reply

Who is online

Users browsing this forum: Bing [Bot]