How do I can associate a enter key with a sprite ?

Get help using Construct 2

Post » Tue Mar 18, 2014 1:03 pm

Hello,
I'm trying to find a solution to launch an action when a user click with the mouse or press the Enter key on a sprite. But I didn't find the method to do this. Could you help me ?
thanks
Mathieu
B
4
G
1
Posts: 7
Reputation: 343

Post » Tue Mar 18, 2014 1:11 pm

Did you add the keyboard or mouse object on your project ?

https://www.scirra.com/manual/113/keyboard
https://www.scirra.com/manual/114/mouse
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Mar 18, 2014 1:19 pm

Plonk
Last edited by shirokuma on Thu Mar 20, 2014 12:50 am, edited 1 time in total.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Wed Mar 19, 2014 9:32 am

Hello,
thanks for your help.
Yes I added keyboard and mouse object in my project but my question is " can we go to another layout when we click on a sprite ?" because I don't find the condition to do this.
thanks,
kind regards,
Mathieu
B
4
G
1
Posts: 7
Reputation: 343

Post » Wed Mar 19, 2014 10:30 am

Yes you can.

On object clicked (Event from the mouse object) -> Go to layout (System action).
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Wed Mar 19, 2014 11:32 am

Thanks,
This problem is solve.
I have one other question about the original size of the sprites I use. Is it important to have a PNG file for each sprite with the real size there is in the game ?
kind regards,
Mathieu
B
4
G
1
Posts: 7
Reputation: 343

Post » Thu Mar 20, 2014 8:23 am

In fact, when I reduced the size of my big pictures to the real size used in the the game, it runs.
Mathieu
B
4
G
1
Posts: 7
Reputation: 343


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 30 guests