Ren'py Code Learn
Ren'py Code Learn
--------------------------------------
label start:
scene bg cave
show lucy happy
l "Now that the lights are on, we don't have to worry about Grues anymore."
l "But what's the deal with me being in a cave? Eileen gets to be out in the
sun, and I'm stuck here!"
transform slightleft:
xalign 0.25
yalign 1.0
= show image, specify its place, and hide it, transform is for saving the setting
--------------------------------------------------------------------------------
scene bg whitehouse
with Dissolve(.5)
pause .5
scene bg washington
show eileen happy
with Dissolve(.5)
"Yes, I do.":
jump choice1_yes
"No, I don't.":
jump choice1_no
label choice1_yes:
$ menu_flag = True
e "While creating a multi-path visual novel can be a bit more work, it can
yield a unique experience."
jump choice1_done
label choice1_no:
$ menu_flag = False
e "Games without menus are called kinetic novels, and there are dozens of
them available to play."
jump choice1_done
label choice1_done:
if menu_flag:
e "For example, I remember that you plan to use menus in your game."
else:
menu:
e "Finally, this shows how you can show dialogue and menus at the same time.
Understand?"
"Yes.":
e "Great."
"No.":
e "If you look at the example, before the first choice, there's an indented
say statement."
define g = Character("[name]")
$ answer = 42
$ flag = True
e "Variable interpolation also works with other variables. Here, the answer is
[answer] and the flag is [flag]."
-----------------------------------------------------------------------------------
--------------------------
e "For example, we might want to have text that is {b}bold{/b}, {i}italic{/i},
{s}struckthrough{/s}, or {u}underlined{/u}."
e "The w tag also waits for a click,{w} except it doesn't break lines,{w=.5}
the way p does."
with flashbulb
show bg whitehouse
with fade
= change text style, shout and whisper, define narrator, rotate image, define
flashbulb, shake screen horizontally
with hpunch and vertically with vpunch