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.

DarkBASIC Discussion / If Key is not Pressed

Author
Message
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 13th May 2004 05:52
How the heck do I get DB to check if the key's NOT, I repeat, NOT being pressed. I tried scancode equaling zero, and same with keystate and inkey, but it doesn't work.

I have it so that if you hold a, according to a speed# value, you accelerate. I want to have the object keep the same speed without holding or pressing the button. But every time I let go, it stops.

<img src="http://mariospy.250x.com/SMILEKIDS.txt">
Don't try to understand this. You won't.
Night Giant
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location:
Posted: 13th May 2004 07:33


keystate works just fine here.

oh, wow. insignificantpunks.cjb.net. we like orange treble clef notes, just for future reference.

no: website for progs yet.
WhizzRich
22
Years of Service
User Offline
Joined: 30th Nov 2002
Location:
Posted: 13th May 2004 21:10
As NightGiant said, either do
or you can do
(<> means not equal to)

WhizzRich ---
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 14th May 2004 02:38
Ah, I know why it wasn't working. It would keep the same value, but I forgot to set the speed. My bad.

Login to post a reply

Server time is: 2025-05-23 19:48:26
Your offset time is: 2025-05-23 19:48:26