Page 1 of 1

Which button was pressed?

Posted: Tue Sep 08, 2015 11:16 am
by dubem
Hey gang!

I'm making a one button minigame for my colleagues.

At the beginning of the game, every player should be able to press a button of her choice. This button then becomes the "action" button for this player for the rest of the game.

How can I do this?

Löve and kisses

Alex

Re: Which button was pressed?

Posted: Tue Sep 08, 2015 11:28 am
by s-ol

Re: Which button was pressed?

Posted: Tue Sep 08, 2015 11:50 am
by dubem
Sorry, but i don't get it. How do I use keypressed to assign a key to the player after pressing?

Re: Which button was pressed?

Posted: Tue Sep 08, 2015 12:44 pm
by s-ol
dubem wrote:Sorry, but i don't get it. How do I use keypressed to assign a key to the player after pressing?
You detect the key that is pressed and store it in a variable, then use that variable as a reference later to find the player who pressed it.