Search:
Forum
General C++ Programming
doubble hotkey?
doubble hotkey?
Jul 14, 2009 at 10:11pm UTC
poonninja
(58)
i am creating a game and i and when the user presses control and an arrow key to give them a boost.
what i have so far is
1
2
3
4
5
case
VK_CONTROL && VK_RIGHT: giveboost();
break
;
it doesnt work at all. deos any one know how to do this?
Last edited on
Jul 14, 2009 at 10:12pm UTC
Jul 14, 2009 at 10:45pm UTC
Bazzy
(6281)
If you are switching cases, you can't have two values simultaneously.
You should change the way you are getting input or in case VK_RIGHT check if Ctrl is pressed
Jul 14, 2009 at 11:11pm UTC
poonninja
(58)
ok thanks that worked :)
Last edited on
Jul 14, 2009 at 11:11pm UTC
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs