How do I make a set animation upon click a sprite?

Get help using Construct 2

Post » Fri Nov 30, 2012 2:55 am

Hi all

I am new to Construct 2, realized that it is quite easy to use actually but now I am having problem with clicking a sprite and upon clicking it, let the main sprite play animation.

I have a main sprite and a sprite which I treat as button.

The main sprite has an animation call 'throwing' which consists of 2 frames.

The sprite button is for me to click it using a mouse click and upon clicking, the main sprite will play the animation 'throwing'.

At the end of the 'throwing' animation, the main sprite will spawn another object (a rock).

How do I do this?

I have trouble on playing animation upon clicking the button sprite.
B
2
Posts: 3
Reputation: 631

Post » Fri Nov 30, 2012 4:01 am

- Object is Clicked
-> Object 2 set animation "Throw"

- Object 2 animation frame = 1
-> Object 2 create new object rock at layer # image point #
B
40
S
12
G
7
Posts: 603
Reputation: 7,646

Post » Fri Nov 30, 2012 4:28 am

[QUOTE=EncryptedCow] - Object is Clicked
-> Object 2 set animation "Throw"

- Object 2 animation frame = 1
-> Object 2 create new object rock at layer # image point #
[/QUOTE]





I tried that before but the animation did not play fully. It only shows frame 0.

I also tested to see if my animation is correct. To test whether my animation is correct, I tried putting cursor over object, it plays the animation.

But I do not want my cursor to be over the object, I want to mouse click on the object.bombrat2012-11-30 04:28:59
B
2
Posts: 3
Reputation: 631

Post » Fri Nov 30, 2012 4:57 am

I don't have computer access right now but I'll make an example in the morning.

(Edit: Read the events wrong)EncryptedCow2012-11-30 04:59:36
B
40
S
12
G
7
Posts: 603
Reputation: 7,646

Post » Fri Nov 30, 2012 4:14 pm

thank you! looking forward to it! :)
B
2
Posts: 3
Reputation: 631


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, mystazsea and 15 guests