Temporary disable click-to-continue, how ?

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
ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

Temporary disable click-to-continue, how ?

#1 Post by ihentai »

In "Reconstruction" starting intro/splashscreen have different befavior than the other game.
In game you use click-to-continue, in splashscreen you don't. When i think about it,
they probably directly call nessessary routines and not use standart
elena "hi!"
Buit the question is - can your control speed of messages(not text) using styles? When
i set things like style.XXXX.slow_cps, the text in message is printed with speed I set.
But after every message click-to-continue still used.... How to disable it/set speed of messages ?

yummy
Miko-Class Veteran
Posts: 733
Joined: Fri Jul 07, 2006 9:58 pm
Projects: Suna to Majo
Location: France
Contact:

#2 Post by yummy »

You might use the pause function like this:

Code: Select all

Character "Hallelujah!"
$ renpy.pause(2.0)
Girl "..."

ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

#3 Post by ihentai »

I think renpy.pause() is not set a pause behavior, but simply wait timeout or click-to-continue
....

ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

#4 Post by ihentai »

Ok, i found in examples for renpy.pause() something that partially solve the problem. -
show function

:) Now I like to know figure out how to create a function in ren'py syntax ....

and how to make show use a character settings ... if it possible

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:

#5 Post by PyTom »

Usually, what you want to do in a splashscreen is to use a lot of "with" statements. The idea is that the user can click, and you want the clicking to skip him directly to the main menu. Something like:

Code: Select all

label splashscreen: 
     scene bg splashbg
     with dissolve

     show logo at truecenter
     with moveinright
     with Pause(2.0)

     hide logo
     with moveoutleft
 
     scene black
     with dissolve

     return
I'm not sure what you mean by:

"how to create a function in ren'py syntax"

or

"how to make show use a character settings"

What do you want to do?
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

ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

#6 Post by ihentai »

PyTom wrote: "how to create a function in ren'py syntax"
As you mentioned a splashscreen is a lot of "with" code. Sometimes it is
convenient to define a function and use something like

intro_text("That was a beginning ")
intro_text_type2("Beginning of a story ")
intro_text("about two people ")

with lots of with inside a function intro_text. I can done it defining a function in
python in init: statement. But that function will be in python syntax mode , correct ?

How Can I use a ren'py syntax in definition of python function. Something like

Code: Select all

def intro_func1():
           show logo at truecenter 
           with moveinright 
           with Pause(2.0) 
PyTom wrote: or

"how to make show use a character settings"
"show text" use a default style to output symbols. If I already defined a character : elena=Character()
with appropriate colors and styles, can I output text using "show text" with elena already defined settings

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:

#7 Post by PyTom »

No on the "show text" using a character style, athough you can call the character with interact=False to get the text box on the screen. For example:

Code: Select all

$ elena("Hello, World", interact=False)
with Pause(2.0)
You can't include Ren'Py code in a python function. You can use equivalent python functions (like renpy.show, renpy.with_statement, and so on.),

Alternatively, you can call a Ren'Py label:

Code: Select all

label intro_func1:
           show logo at truecenter
           with moveinright
           with Pause(2.0) 
           return

label splashscreen:
    call intro_func1
    return
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

ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

#8 Post by ihentai »

Thanks ! I figured out that a call/label can be used, but without a good way to send parameters. The temporary variable can be used but the resulting code will look a little
ugly. Like in my old BASIC on microcomputer(or how that things called) days.

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:

#9 Post by PyTom »

This is actually on the list of things I'll be addressing in the next release.
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

ihentai
Newbie
Posts: 22
Joined: Wed Mar 21, 2007 6:24 pm
Contact:

#10 Post by ihentai »

PyTom wrote:This is actually on the list of things I'll be addressing in the next release.
Year, that would be great !

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#11 Post by monele »

Wow, I've never dared ask for this :D...

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:

#12 Post by PyTom »

Well, this is one of those features where I think I've been seeing some demand for it, so I want to address that demand.

Currently, I plan at four things:

1) Dynamically scoped variables. These are variables that have their value restored when the current function call returns. For example, one could write:

Code: Select all

label func:
   dynamic a
   $ a = 42
   "%(a)d"
   return

label start:
    $ a = 37
   "%(a)d"
    call func
    "%(a)d"
This would say 37, 42, 37.

2) Add a syntax to labels that would let a label take parameters. These parameters would be dynamically scoped variables.

3) Add a syntax that allows call to supply parameters.

4) Add some way to have "return" return a value, and to have "call"
have a way of having call capture that result.

Code: Select all

call battle("Lemmaesque Mushroom", 2) as outcome
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#13 Post by monele »

And something like

Code: Select all

label func(param1, param2):
?

That would rock ^^ (and if all this works, "param2=value" would rock even more, of course X3)

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:

#14 Post by PyTom »

That's the plan, yes. The rocking is optional.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#15 Post by monele »

The rocking is optional.
Let's give it a default value of True then? :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]