P
PeterPeashooter
Guest
Sorry, I’m new to coding and so this question is basic. What is the best way to make an RPG character move?
Ideally it needs to
- move with arrow keys smoothly
- change sprite based on direction
- if it stops, it has to stop at the “idle position” (like when a chapter stops, it doesn’t just stop with its legs in the air)
- Run maybe? (Holding shift or some sort of running button makes character move a bit faster)
- collide with a wall which stops the character’s movement
- perhaps the character could be able to interact with something and when you press a button (like ‘Z’) it makes dialogue
I would really appreciate it if someone could help me out because I looked literally everywhere and all of them ended up weird. I can accept really complex code as long as I know how it works w/ explanations.
Thanks for reading,
peter
Ideally it needs to
- move with arrow keys smoothly
- change sprite based on direction
- if it stops, it has to stop at the “idle position” (like when a chapter stops, it doesn’t just stop with its legs in the air)
- Run maybe? (Holding shift or some sort of running button makes character move a bit faster)
- collide with a wall which stops the character’s movement
- perhaps the character could be able to interact with something and when you press a button (like ‘Z’) it makes dialogue
I would really appreciate it if someone could help me out because I looked literally everywhere and all of them ended up weird. I can accept really complex code as long as I know how it works w/ explanations.
Thanks for reading,
peter