How do I set condition on key code to a range of key codes?

Get help using Construct 2

Post » Fri May 16, 2014 12:33 pm

Greetings, gentlemen! I have a small question regarding Keyboard event!

I need something like onAnyKeyPressed condition but excluding keys like Enter or Escape.
I understand it's better to add onKeyCodePressed and add an expression which describes a certain range of key codes or excluding certain key codes like 13, 27 or 91). Dunno what kind of expression should I write. :?

Cheers!
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Fri May 16, 2014 2:15 pm

There may be an easier way to do that, but one way you could do it is to create the On Any Key Pressed event with one subevent for the exceptions, and put an "Else" subevent after that, with the action you want every other key to have.
B
20
S
5
G
1
Posts: 37
Reputation: 1,139

Post » Fri May 16, 2014 6:21 pm

Sounds like a great idea, thanks! Will try that for sure!
B
80
S
23
G
6
Posts: 240
Reputation: 7,761


Return to How do I....?

Who is online

Users browsing this forum: el3um4s, Ryan Kocourek, TylerJS and 13 guests