![]() |
Okay, I have a few SDL sprites who move when I hit the arrow keys, according to this code:
Code:
int spd = 5; The problem that I have is that when I press and hold right, and then press left (or any other combination of opposite directions, the new one doesn't override the old one. Now, I did try something along these lines: Code:
if ( keys[SDLK_UP] *&& (vikings1.yget() >= 200) ) { So, how precisely would I get these keys to behave the nice, normal way (i.e. each keypress in an opposing direction overriding the last, regardless of hardware capabilities)? |
uhm if you keep a key pressed I think some keyrepeat is kicking in.
so the key "pressed" at a regular interval. there is a function that disables it. |
The current time is 04:52 PM (GMT) |
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.