A couple of screen-language related questions

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.
Message
Author
User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

A couple of screen-language related questions

#1 Post by Samidarenina »

First off, I've got a button in the navigation that is supposed to turn on Auto Read.The problem is that I don't know which function to use. I've been doing random guesswork like "Auto_Forward()" and similar, but had no luck so far.

Second - is there a way to use ImageDissolve transitions when entering from the navigation to a specific menu?

Third - Is there a way to tell the game to stop skipping when entering the menu? The way it currently works is: you enter the navigation; you press skip; it brings you to the game; when you press rightclick you enter the menu, but the moment you leave it, the game continues skipping.
What I want is the game to recognize to stop skipping when you enter the menu.


Thank you very much for your time. I hope someone will be able to help.

P.S.
I already made a thread featuring another problem + these ones, but noticing that the problem was in the cache, I just deleted the topic before anyone had the chance to answer.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: A couple of screen-language related questions

#2 Post by PyTom »

It's best to break a thread like this up into multiple threads, one for each question. Also, please use a subject that reflects the questions you're asking - this one doesn't really help anyone. (This is a new policy that we're beginning to try to enforce.)

Anyway:

1) Use Preference("Auto-Forward", mode), where mode can be one of "enable", "disable", and "toggle".

2) Yes, in the screen do:

Code: Select all

screen whatever:
    on "show" action With(my_imagedissolve)
    on "replace" action With(my_imagedissolve)
3) I'll look into this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#3 Post by Samidarenina »

1) Ah, excuse me, I've expressed myself the wrong way. I meant that when you click the button, you leave the menu and the game starts auto_reading (similar to Skip() ). Is there any way to set that up?

2) I tried using it as

Code: Select all

screen navigation:
    on "show" action With(menu_blinds)
    on "replace" action With(menu_blinds)
but it does absolutely nothing. The screen just opens up the way it always does.
3) Thank you. Until now, it always happens to me that I use skip and enter the menu. And when exiting it, I expect skip to be off just for it to continue skipping. Not really such a big problem, but it felt really awkward to me.

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#4 Post by Samidarenina »

I suppose I shouldn't start designing the actual menu with the auto rea and skip buttons then?
It's a shame, but it seems I'll have to throw them out.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#5 Post by DragoonHP »

Samidarenina wrote:1) Ah, excuse me, I've expressed myself the wrong way. I meant that when you click the button, you leave the menu and the game starts auto_reading (similar to Skip() ). Is there any way to set that up?

Code: Select all

            frame:
                style_group "pref"
                has vbox

                textbutton _("Auto Read") action Preference("auto-forward", "toggle")
Samidarenina wrote:but it does absolutely nothing. The screen just opens up the way it always does.
I used dissolve and it works for me.
Samidarenina wrote:What I want is the game to recognize to stop skipping when you enter the menu.
Try putting

Code: Select all

if config.skipping:
    $ config.skipping = False
under the navigation screen. It might or might not work

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#6 Post by Samidarenina »

1) Again, this turns the navigation button into just a toggle which is not the desired behavior.

3) It just causes skipping not to work at all

Thanks for the try though.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#7 Post by DragoonHP »

1) Do you want different buttons for enable and disable? Then you just have to edit the toggle and put in enable and disable.

3) Okay, tested it and this one works.

Code: Select all

$_game_menu_screen = "stop_skip"
^ Put this in the start label.

Code: Select all

label stop_skip:
    if config.skipping:
        $ config.skipping = False
    jump save_screen
    return
Not a eloquent solution,. but this one works quite well.

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#8 Post by Samidarenina »

1) I originally just wanted to make auto-forrward behave similary to Skip (where you click the button, then automatically get led to the game where it keeps auto-reading.), but I'm starting to get under the impression that I did something to make Auto-Forward not work. Even when it's enabled, it does absolutely nothing. Weird.
3) You really deserve a cookie for this solution - it's really one of those "why didn't I think of this myself?" things. :D

Edit: I just tried to turn on Auto-Forward in the Tutorial game and the text just stands still. Is there anything specific I have to do to make Auto-Read work or did I mess something up? Surprisingly enough, I cannot find any real info on the auto read function in the documentation.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#9 Post by DragoonHP »

1) You can always group together actions

Code: Select all

 action [Preference("auto-forward", "toggle"), Return()]
This might be just a silly thought, but have you waited long enough?
If your auto-read value is set at low, it can take a little while (mine is set at max and I read the sentence four-five times before it stepped to the nest one)

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#10 Post by Samidarenina »

In fact, that was exactly what I had in mind. Then I just planned to do exactly that what you did with Skip to turn auto-forward off. (I'd just have to think of a way to make an auto-forward indicator, but that's a story for another time.)

In the tutorial, I've waited for over a minute after turning on "auto" in the quickbar and nothing happened. Weird.
Come to think of, Auto-Forward was one of those RenPy features I was never able to turn on.

Edit: I've just discovered that the game definitely goes into "auto-forward" mode because if I click, it exits it. The problem still remains that even though it's in auto-forward mode, there is no auto-forwarding going on.
I've been playing around with config.default_afm_time a bit, setting the value both higher and lower, but it didn't help at all.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#11 Post by DragoonHP »

Err... make a new test build and then max out the Auto-forward time bar in preference.
And then wait and pray.

If it doesn't work, well, can't help you then.

And, here's how you'll put a Auto-Forward indicator

Code: Select all

if _preferences.afm_enable:
    # your image code
EDIT: 500th post :-)
Last edited by DragoonHP on Sat Jul 28, 2012 11:10 am, edited 1 time in total.

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#12 Post by Samidarenina »

Alright, so I did try making a new test build and then set the time to really low. And it worked.
I do the same thing in my project - nothing.
Could it be something NVL-related? Because that's the only thing that comes to mind.


Scratch that, I've cleared the persistent data and now it works. How silly of me. :'D

Thank you a lot, DragoonHP. You really saved me here :D


Now, excuse me for bugging you about something one last time, but I was hoping you may be able to help with the following. I've already mentioned that I'd like the auto-forward to get turned off when entering the menu, too. Now, I tried to accomplish that with

Code: Select all

if config.afm_enable:
        $ config.afm_enable = False
because I wasn't sure about the right function. Obviously, it didn't work.
Any suggestions on this?

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#13 Post by DragoonHP »

It's not a config variable.

Code: Select all

if _preferences.afm_enable:
    _preferences.afm_enable = False
^ This should work,

User avatar
Samidarenina
Regular
Posts: 137
Joined: Sun Aug 01, 2010 1:21 pm
Contact:

Re: A couple of screen-language related questions

#14 Post by Samidarenina »

I'm getting an "expected statement" error with that one.
And when changing it to "$ _preferences.afm_enable = False", then it does nothing at all.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: A couple of screen-language related questions

#15 Post by DragoonHP »

I forgot the $ sign; sorry.
And just tested it and it works for me.

Where are you putting it?

Post Reply

Who is online

Users browsing this forum: Black Spriggan, Ocelot, Semrush [Bot], snotwurm