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.
# for moving left
if x>0: # check if player is not at the left side of field
if gf[y][x-1] != 1: # check if tile at left is not 0
key "focus_left" action [SetVariable("x", max(x-1, 0)), SetVariable("avatar", 1), SetScreenVariable("my_var", 0)] # <-------added a SetVariable for avatar
else:
key "focus_left" action NullAction()
Base on which the player's image appears on screen
# player's token
grid 22 12:
align gf_align
at my_tr
for py in range(12):
for px in range(22):
if py == y and px == x:
add "token[avatar]" : #<-------------------here
if gf[y][x] == 2: #si es tile_2...
offset (20, -20) # that is 20 pxls to the right and 20 pxls up
Last edited by bonnie_641 on Thu Aug 15, 2019 7:48 am, edited 1 time in total.
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.
Thank you so much Kia
I'll finally be able to hide the image on a screen.
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.