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.
$ character = "Deckard"
$ year = "484-12-04"
show screen sideScreen(character, year)
The problem is, if I change "Deckard" into "Batty", the variable does change but it remains "Deckard" on the side screen. So, how would I change this, because part of the game I am making includes jumps to different timelines and so the date must change and the perspective with it.
So, I did that, pretty much similar to how you wrote it, but what occurs now, is that it never shows as 'Deckard'. When I initialize the game, it should be 'Deckard' for a little bit and then change into 'Batty' but now, I initialize it and its automatically 'Batty' even though that variable change hasn't happened yet. However, thanks for the advice on 'character', I changed it into 'primChar'. So:
label start:
show screen sideScreen
"Should be Deckard, but is showing as Batty"
$ primChar = "Batty"
"Now is when the change to Batty happens but it is already Batty, so, no appearance of change"
IrinaLazareva wrote: ↑Mon Sep 16, 2019 5:29 pm
Hmm. should work. Well, you can track the state of the variable: when the game is running, press Shift+D and then click "Variable Viewer"....
default primChar = "Deckard"
label start:
show screen sideScreen
I've tried both of them, the result is still the same. By the Variable Viewer, upon initialization, the variable primChar starts off as 'Batty' despite the change to it coming later. For visualization sake, this is what I have:
You might consider changing the variable "year" as well. It is reserved within python datetime, and Ren'Py internals use it.
It could be causing errors.
Might I suggest just "yr"
Is also suggest trying the "delete persistent" and "force recompile" options within the launcher.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Imperf3kt wrote: ↑Mon Sep 16, 2019 6:33 pm
You might consider changing the variable "year" as well. It is reserved within python datetime, and Ren'Py internals use it.
It could be causing errors.
Might I suggest just "yr"
Is also suggest trying the "delete persistent" and "force recompile" options within the launcher.