Moving Images on Button input

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.
Post Reply
Message
Author
Nifkit
Newbie
Posts: 1
Joined: Tue Jan 11, 2022 2:30 pm
Contact:

Moving Images on Button input

#1 Post by Nifkit »

I am trying to make an Image move Left / Right with A / D. I cant find anythink like a guide to binding an action to a Key or anything similar.
Overall goal is to make character.png move Left or Right depending on the Input given but I cant Figure out how to do it.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Moving Images on Button input

#2 Post by Ocelot »

Use key screen statement to listen for keypress: https://www.renpy.org/doc/html/screens.html#key
< < insert Rick Cook quote here > >

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Moving Images on Button input

#3 Post by Alex »

Sample of game operated with keys - viewtopic.php?f=51&t=18047&start=15#p395929

Post Reply

Who is online

Users browsing this forum: Google [Bot]