Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - WiseFrog

#21
First of all hi to everyone, I'm new around here hahaha. After a long time of experimenting with ags and helping a friend with his games, I decided to start a personal project and also took the opportunity to register on the forum.

I'm trying to make a game that uses the keyboard to walk (I'm using eri0's controlz module). The problem is the following: when you keep the keys pressed, the character walks perfectly well and fluidly, but if you decide to just tap the keys, you can notice that the character makes huge jumps during the walk. Investigating I notice that this can be solved by changing the character speed to 1 for example, then in that way the walking tapping works perfect and fluid but it is incredibly slow if the key is pressed all the time so the character can walk for a longer time. I tried to fix it with on_key_pressed but it changes the speed to 1 all the time and not just when it is tapped.

My question is: is there any way that the character speed is 1 only if the key is tapped but 4 (for example) if it is pressed all the time?

Thank you so much in advanced
SMF spam blocked by CleanTalk