Ask here your questions to get help using GDevelop.
User avatar
By azerty560
#67113 Hello everyone ! sorry for my english i'm french

I have a displacement problem, I would like my character to move on a grid. (boxes 32 pixels x 32 pixels)
My problem is that my character moves well by 32 pixels by 32 pixels but far too fast.

How can slow down the displacement?
I try to slow down time: change the time scale by 0.5 its not working!

Image
Image
User avatar
By Lizard-13
#67114 Put a timer condition on every moving event and reset this time when you move, something like:
Code: Select allConditions: Left key pressed
            Value of timer "move" is > 0.5 seconds
Actions: Do - 32 to the X position of Player
         Reset timer "move"

Conditions: Right key pressed
            Value of timer "move" is > 0.5 seconds
Actions: Do + 32 to the X position of Player
         Reset timer "move"
User avatar
By Lizard-13
#67122 Because you are adding + 32 to the player position, i.e. you are teleporting it. What you want to do (a classic grid based movement like on RPG Maker) is a bit more complex, I've made an example here: http://forum.compilgames.net/viewtopic.php?f=19&t=9760#p65521