How do I define clickable frames

Get help using Construct 2

Post » Thu Sep 07, 2017 7:36 am

Message: yolkgames can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Help! How can I define clickable frames for an animation? see the video https://www.youtube.com/watch?v=WqIc_GvUbPQ see 0:27 sec... U can undersatnd what i say ......
B
8
S
2
Posts: 27
Reputation: 554

Post » Thu Sep 07, 2017 7:56 am

Not sure what am I supposed to see in your video at 0:27

If you want only certain frames be clickable, you can add this condition to your "On Click" or "On object clicked" event:
YourSprite -> Compare Frame
Check out my awesome game Doptrix
B
17
S
9
G
29
Posts: 517
Reputation: 16,833

Post » Thu Sep 07, 2017 8:02 am

Thanks for your reply
How to control animation frame with mouse event
B
8
S
2
Posts: 27
Reputation: 554

Post » Thu Sep 07, 2017 9:56 am

You want to change animation frame when mouse is clicked? It's easy.

1. Add Mouse object to your layout if you haven't done it yet.

2. Create event:
Mouse -> On Click (or On Object Clicked)

3. Create action for this event:
YourSprite -> Set Animation Frame

Also, make sure that the animation is stopped (speed is set to 0).
Check out my awesome game Doptrix
B
17
S
9
G
29
Posts: 517
Reputation: 16,833

Post » Fri Sep 08, 2017 11:12 am

Hey @yolkgames!

It seems you have a sprite with multiple frames and want to advance to the next frame everytime you cklick that object, am I right?

Check the .capx below. Click to advance to the next color and right-click to go back to the previous one.

https://www.dropbox.com/s/v3afdy5mxxqyn ... .capx?dl=0

Hope it helps. Cheers!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
2
Posts: 537
Reputation: 3,241


Return to How do I....?

Who is online

Users browsing this forum: jbr190 and 34 guests