I was wondering if its possible to use the call function to return to the line you were on when you called, rather than the one after it?
I'm currently working on a system where you can press a button to gain further information at certain points in a conversation. After playing the additional information label, I'd like to return to the line that was on screen when the player clicked the button, rather than the line after it.
I saw in the documentation that there's a 'from clause' that can move to a label, though I'm not sure if that would be of any help to me or if its for just for handling saved games.
Anyone got any ideas on how to handle this? My button, press function and example of use below. The press_statement there is a global variable (gross, I know ) that is changed whenever a line of dialogue that can be successfully pressed is on screen.
Thanks!
Code: Select all
textbutton _("Press") action If(can_press, Function(press), None)
Code: Select all
init python:
def press():
if press_statement:
renpy.call(press_statement)
else:
renpy.call("generic_press")
Code: Select all
#enable abilty to press character, define specific press dialogue found in custom_labels_press.rpy
$ can_press = True
$ press_statement = "in_lab"
#dialouge
j "I don't know what you're talking about."
#keep press enabled but default it to the generic press dialogue
$ press_statement = None
$ correct_item = jay_access