stupid keyboard input probelm

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dark_Exodus
Posts: 23
Joined: Thu Jan 29, 2004 4:07 pm
Location: Birmingham, UK
Contact:

stupid keyboard input probelm

Post by Dark_Exodus »

How do you get input from 2 keys at the same time?
e.g. forward and left movement. :roll:

Is it possible to use some kind of double case statement?
ZDeveloper
Posts: 35
Joined: Wed Mar 24, 2004 2:34 pm
Location: Germany
Contact:

Post by ZDeveloper »

I don't test it, but can't you make an if case?

if (KeyA==true && KeyB==true)
{
//event
}

This is only an idea and I don't know if that works, but I think it should works. Or do I make a mistake?

EDIT: Yes I remember now. You have to mak it so like in the Techdemo programm. You can find the source code on the Irrlicht page. It will not work with the simple code like it is shown in one of the first tutorials.
Look at http://www.z-software.de for interesting games.
alelink
Posts: 52
Joined: Tue Jan 20, 2004 8:32 pm
Location: Italy
Contact:

Post by alelink »

search the forum, there's a great tutorial on this :)

It uses a boolean array to store the state of the keys.
Post Reply