|
1.
|
|
|
Statement Equivalents
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:8
|
|
2.
|
|
|
To allow Ren'Py to be scripted in python, each Ren'Py statement has equivalent Python code. This usually consists of a Python function, but may also consist of a code pattern that performs an action equivalent to the statement.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:10
|
|
3.
|
|
|
Dialogue
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:17
|
|
4.
|
|
|
The Ren'Py say statement is equivalent to calling the character object as a function. The following code displays the same line twice::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:19
|
|
5.
|
|
|
Displaying narration can be done the same way, by using the ``narrator`` character. When calling a character, it's possible to supply the keyword argument `interact`. When interact is false, Ren'Py will display the character dialogue box, and will then return before performing an interaction.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:26
|
|
6.
|
|
|
This equivalence of characters and function objects works in the other direction as well. It is possible to declare a python function, and then use that function in the place of a character object. For example, the following function uses a variable to choose between two characters. ::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:32
|
|
7.
|
|
|
A function used in this way should either ignore unknown keyword arguments, or pass them to a character function. Doing this will allow the game to continue working if Ren'Py adds additional keyword arguments to character calls.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/statement_equivalents.rst:59
|
|
8.
|
|
|
The equivalent of the say statement.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/se_say:5
|
|
9.
|
|
|
`who`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/se_say:10
|
|
10.
|
|
|
Either the character that will say something, None for the narrator, or a string giving the character name. In the latter case, the :func:`say` is used to create the speaking character.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/se_say:8
|