Page 1 of 1

stupid keyboard input probelm

Posted: Wed Mar 31, 2004 7:02 pm
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?

Posted: Wed Mar 31, 2004 9:08 pm
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.

Posted: Wed Mar 31, 2004 10:35 pm
by alelink
search the forum, there's a great tutorial on this :)

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