Its possible to rebind keys??

Get help using Construct 2

Post » Fri Jun 20, 2014 8:02 am

hi guys...do you think is possible to have the option of rebindable keys for the control of the game
as long as i can tell, there is no way of tell what buttom in the keyboard is being pushed,it would be nice to get the input and be able to store it in a variable
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Fri Jun 20, 2014 11:10 am

Message: monitz87 is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
The keyboard object has a "Keyboard.LastKeyCode" expression which returns a number representing the last key pressed (which you can store in a variable), and a "On key code pressed" trigger which receives the key code as a parameter. You can create variables to store the KeyCodes currently assigned to each action in your custom controls, and then use the "On key code pressed" trigger to execute them.

I attached an example capx
You do not have the required permissions to view the files attached to this post.
B
6
S
2
Posts: 79
Reputation: 608

Post » Sat Jun 21, 2014 6:40 pm

monitz87 wrote:The keyboard object has a "Keyboard.LastKeyCode" expression which returns a number representing the last key pressed (which you can store in a variable), and a "On key code pressed" trigger which receives the key code as a parameter. You can create variables to store the KeyCodes currently assigned to each action in your custom controls, and then use the "On key code pressed" trigger to execute them.

I attached an example capx


wow!!! thanks!!! :)
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Thu Jul 10, 2014 9:33 am

I have been looking for this too, Thank you :)
Try my creations on newgrounds or Google play, feedback highly appreciated!

ImageImage
B
9
S
1
Posts: 73
Reputation: 785


Return to How do I....?

Who is online

Users browsing this forum: DjowG, ramyaswetha and 4 guests