0 Favourites

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

  • 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.

    • Object is Clicked
    • > Object 2 set animation "Throw"
    • Object 2 animation frame = 1
    • > Object 2 create new object rock at layer # image point #
  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • - Object is Clicked

    -> Object 2 set animation "Throw"

    - Object 2 animation frame = 1

    -> Object 2 create new object rock at layer # image point #

    <img src="http://playgamelah.com/screenshot2.png" border="0" />

    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.

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

    (Edit: Read the events wrong)

  • thank you! looking forward to it! :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)