Self

您所在的位置:网站首页 极度异常作弊码 Self

Self

#Self| 来源: 网络整理| 查看: 265

Text displayables

Ren'Py will extract text from a Text displayable, and make it available to be read to the player.

Alternative text

Alternative text is supplied by a displayable's alt style property. It can also be supplied by actions supplied to buttons and values supplied to bars. Explicitly supplied alternative takes precedence over text supplied by actions or values, and both take precedence over text extracted from Text displayables.

Alternative text is translated using Ren'Py's string translation mechanism. Alternative text takes precedence over text extracted from a displayable and its children, but such child text is made available as the "[text]" string substitution. No other string substitutions are allowed.

For example:

screen information(message, planet, badness): text message: color color_from_badness(badness) alt "Information for you : [text]. Badness is " + str(badness) text "ORIGIN_OF_MESSAGE_{color=#f00}[planet!u]{/color}": alt "Origin of message is " + planet

In the above example, the badness and planet variables cannot be substituted directly using "[badness]". Concatenating it manually is a solution.

Supplying the who_alt and what_alt parameters to Character sets the alt style property for the character name and body text, respectively. As an example, we define a Character that uses italics to indicate thoughts normally, but explicitly indicates thoughts via self voicing:

define thought = Character(None, what_italic=True, what_alt="I think, [text]") Descriptive Text

Descriptive text is text that is displayed (and spoken) by the narrator if self-voicing is enabled. The text is not displayed if self-voicing is disabled. Self-voicing text uses the alt variable, which is defined to be similar to a character.

alt = ... link

A character-like object that uses the narrator to speak text if self-voicing is enabled.

For example:

e "Hang on, this is gonna be a bumpy ride!" alt "And then the sun exploded..." # A complex and exciting cut scene. show event sun_exploding pause 10

There is a variable that controls descriptive text:

define config.descriptive_text_character = None link

If not None, this should be a character object that is used to display the descriptive text, instead of the narrator.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3