changing animation

This forum is currently in read-only mode.
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • I cant figure it out how to make change animations exactly I want.

    I have a character with animation (and set animation on start)

    when I get mouse over this character I want to play another animation (I set another animation and it works ok).

    but if I click on character I want to play new animation and it does not work (maybe it does not know if it should play animation with mouseover...). I cant find how to solve it. And after this animation I want this sprite to stay at last frame whatever happens.

    can someone help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might need to add an event to check which animation is currently playing?

    If you have 'animation 1' activated on mouseover, and then try to trigger 'animation 2' on mouse click, it wont work because the condition 'mouseover is still true.

    It would be better if you posted the .cap for somebody to look at.

  • I finally found soulution...

    I made a global variable and for first animation (mouseover) I made a condition that value must be less or equal than 0, then I made an event for click on object. first it is adding value to that global variable and than second animation can be played... so it works. but i am really beginner with this. is it ok like that, or there is some more elegant and cleaner way how to do that?

  • You could do the following:

    Add mouse and keyboard object

    Go to layout, new event:(mouse and keyboard>mouse is over object...>set animation...)

    Add new event again,:(mouse and keyboard>on object clicked...>Set animation...)

    If I am correct <img src="smileys/smiley2.gif" border="0" align="middle" />

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