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.

AppGameKit Classic Chat / While button is being pressed?

Author
Message
Daqs
9
Years of Service
User Offline
Joined: 23rd May 2015
Location:
Posted: 9th Jun 2015 02:04
How do I implement the logic behind .. "while button is pressed, A happens" ..

so that, it's updating each frame. For e.g. while button W is being pressed, sprite moves UP, instead of smashing the W key to make the sprite move UP.

I'm having problem implement this by using the following code:





since the code below gets updated only once per frame/i.e. once per click of button W.

Thanks.
Daqs
9
Years of Service
User Offline
Joined: 23rd May 2015
Location:
Posted: 9th Jun 2015 03:40
Solved. Had to use GetRawKeyState() instead!

Login to post a reply

Server time is: 2024-09-29 01:17:04
Your offset time is: 2024-09-29 01:17:04