Page 4 of 4

Posted: Thu Apr 21, 2005 4:02 pm
by Megaman Z
so it's the same as having something like this in VisBASIC, then...

Code: Select all

private sub refreshgame
'[meaningless code here]
ENDING: 'label
NM "<yatta yatta>" 'yes, I'm still stealing code examples from the source code of my game... so sue me!
'etc.

ENDING: 'another label
NM "<different yatta yatta...>"
'etc.
'multiple lines of code
goto ENDING
end sub
(I know that this would produce an error...)

Posted: Thu Apr 21, 2005 6:52 pm
by chronoluminaire
It's exactly as if all your scripts are put together. In any order. First all the init blocks are executed, then the splashscreen or main menu is called, and unless you've overridden it the game will start at the Start label. Then you can jump around as you wish.

For example, in When I Rule The World I had two files just containing init (images.rpy for the images and init.rpy for everything else); one file (chapter1.rpy) for the first section of script, from the start: label up until the second choice; one file for each of the branches from there (eletis.rpy and takeshi.rpy), which can under some circumstances jump between one and the other; and one file for the credits and ending (omake.rpy). Those correspond to the different .rpyc files you see in the WIRTW game directory. I renamed them for release to avoid giving anything away about the plot structure.