Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Character Movement problem

Author
Message
Novan
16
Years of Service
User Offline
Joined: 21st Jul 2008
Location:
Posted: 1st Aug 2008 04:22
I have searched and searched for hours and cant find the solution to my problem. I want to move the character one space when the player presses the up key. Instead the character moves all the way to the top. How do i get the key to only happen once per press.
Ian G
16
Years of Service
User Offline
Joined: 3rd Jun 2008
Location: SSM, Canada
Posted: 1st Aug 2008 06:44
Use a flag to know when the user has pressed the key and reset when they have let go.

Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 2nd Aug 2008 00:36 Edited at: 2nd Aug 2008 00:36
Actually, this
might be a bit more efficient and clean, leaving out the need to reset a flag when the key is not pressed.

Login to post a reply

Server time is: 2024-11-25 19:42:10
Your offset time is: 2024-11-25 19:42:10