How do I add keyboard recognition?

Just started using Construct 2? Post your questions here

Post » Mon Sep 22, 2014 6:59 pm

I already managed to make it so that the keys i press are recognized, but i think the way it was made it's not efficient as i used an event for each letter, what would you recommend so that letters are recognized using less events?

Also, after that i'd like to add a system which would randomly show words on screen and you have to type every letter in order, how would you approach that?
You do not have the required permissions to view the files attached to this post.
B
7
S
2
Posts: 4
Reputation: 485

Post » Mon Sep 22, 2014 7:59 pm

It really depends on how you're doing.

I'm not sure your experience level, but you could store the state of each key in a dictionary object

"r" -> on
"s" -> off
...
"shift" -> on
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730

Post » Sun Sep 28, 2014 3:50 pm

Here is little demo with Keyboard and CHR$ codes work it out from that
You do not have the required permissions to view the files attached to this post.
B
269
S
52
G
16
Posts: 2,045
Reputation: 44,140


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests