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 / Reading input...,

Author
Message
Murder
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: Cybertron
Posted: 1st Apr 2005 03:56
im trying to read input using the scancode() function, if the player presses "W" go up, "S" down, "A" left.... how do i find out if the player is pressing W & A, so i can move the player diagonally??

- Wes

"You have to beat the man.....To be the man"
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 1st Apr 2005 04:18
use keystate instead. It is a similar command, except it allows you to specify a key and see if it is pressed, not see which buton is pressed. You use it like this:



so, for your purposes, you want:



the paramter that you put in the brackets is the same number that you would use for checking the scancode().

Part of solving the problem is actually noticing that the problem is there in the first place

Murder
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: Cybertron
Posted: 3rd Apr 2005 02:26
Dodo....your the bomb! code worked like a charm, Thanks

"You have to beat the man.....To be the man"

Login to post a reply

Server time is: 2024-09-23 17:32:00
Your offset time is: 2024-09-23 17:32:00