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.
Not sure if this is possible, but I don't think this is too hard of a question.
How do I make a script that continues playing / repeating while the rest of the game continues as normal?
I'd basically like to add something as simple as this:
Hi there stray, thanks for your suggestion!
So unfortunately that won't work exactly as I hoped. It's important that I can update variables.
That way I can check with an if statement to see if the guard is currently looking at the player.
For example:
layeredimage guard:
'guard.png'
default guard_direction = 1
init python:
def guard_sweep(trans, st, at):
global guard_direction # publish direction globally
guard_direction = trans.xzoom = -guard_direction # reverse direction
return 2 # seconds until next flip
label guardScript:
show guard:
function guard_sweep
'We need to sneak past, just say when!'
if guard_direction == 1:
'You managed to sneak by.'
else:
"You've been caught!"
'end'
return