How do I use a sprite(image) as a button?

Get help using Construct 2

Post » Fri Sep 26, 2014 2:44 am

How do I use a sprite(image) as a button?
B
8
S
2
Posts: 134
Reputation: 1,001

Post » Fri Sep 26, 2014 2:45 am

Add the Touch object, then "On touched Sprite", do your action.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Fri Sep 26, 2014 2:48 am

Can i highlight it to a frame when the mouse is above it and set it to normal frame when the mouse is not over it and set it to another frame when the mouse clicks it and have it perform a action after 30 seconds such as going from the main menu screen of my game to the level select screen?
B
8
S
2
Posts: 134
Reputation: 1,001

Post » Fri Sep 26, 2014 2:59 am

Sure you can. You just need to do all the work! Have variations of the button with the different graphics, either as frames or animations. You need to add the Mouse object. Use "Cursor is over Sprite" to test for that particular condition.

You should look at the tutorials to get lots of ideas on how to do things.
Last edited by blackhornet on Fri Sep 26, 2014 3:35 am, edited 1 time in total.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Fri Sep 26, 2014 3:02 am

thanks for the help
B
8
S
2
Posts: 134
Reputation: 1,001

Post » Fri Sep 26, 2014 5:23 am

The simplest programmer art way is to make a sprite in the basic color for the sprite and then click copy. Now click in the frames bar and right click to add a frame. Click the new frame and paste the first sprite you copied in, now make it a darker or lighter, bigger or smaller version. Now you have an easy toggle button sprite. All you need to do is select sprite with a event and add action change frame at appropriate times.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, Yahoo [Bot] and 10 guests