How do I Make the player make animation on key?

From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • It sounds very silly, i read all the tutorials and I just have no idea what I did wrong, and yet, it still not working.

    the only things im trying to make is the player do animation-(Invisibility) while clicking something (here is by clicking 'Z')

    (later on im trying to make the player interacting with that animation with enemy. but till there..)

    That's it, where and what I did wrong

  • It's a common issue so not to worry. It's because several conditions are true for setting animations so it tries to set them all at once and you end up seeing the animation which appears last in the event sheet. In this case you can be pressing Z but also 'not moving' which triggers both of the Invisible and Standing animations. Way to get around it is to add other conditions to the bottom events such as 'player is not moving' AND 'animation invisible is not playing'.

  • It's a common issue so not to worry. It's because several conditions are true for setting animations so it tries to set them all at once and you end up seeing the animation which appears last in the event sheet. In this case you can be pressing Z but also 'not moving' which triggers both of the Invisible and Standing animations. Way to get around it is to add other conditions to the bottom events such as 'player is not moving' AND 'animation invisible is not playing'.

    so, if im getting it right, for each 'key' i need to add that the animation is false? and hmm not moving? so how they will move, hard for me to understand this logic, sorry

  • More the other way round because the key press is the overriding animation. You want to play moving and idle whenever possible, so you add conditions to these animation events such as 'invisible is not playing', so if invisible is playing it will not play standing or idle until invisible ends, then return to playing either moving or idle.

    In the specific case of your event sheet you can add second conditions to both the bottom events 'invisible is not playing' and it would be fixed but also trying to explain why it would be fixed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • More the other way round because the key press is the overriding animation. You want to play moving and idle whenever possible, so you add conditions to these animation events such as 'invisible is not playing', so if invisible is playing it will not play standing or idle until invisible ends, then return to playing either moving or idle.

    In the specific case of your event sheet you can add second conditions to both the bottom events 'invisible is not playing' and it would be fixed but also trying to explain why it would be fixed.

    Yeah I got it, thnx for the quick answer, but wont it make the player do only that animation and stick with it on the last frame even when im clicking the arrows- it will disable the walking animationg, those stuff are really confusing

  • When the animation ends on the last frame it counts as not playing anymore or finished. So as soon as it finishes, it will revert back to whether the player is moving or not and play those animations. Essentially the player shows moving or idle until you press Z, then invisible plays and finishes, then we return to when you hadn't pressed Z. The only way it could be an issue is if 'invisible' loops, but in that case you would expect it to be on a timer or stop on another button press which is also a fine trigger.

  • When the animation ends on the last frame it counts as not playing anymore or finished. So as soon as it finishes, it will revert back to whether the player is moving or not and play those animations. Essentially the player shows moving or idle until you press Z, then invisible plays and finishes, then we return to when you hadn't pressed Z. The only way it could be an issue is if 'invisible' loops, but in that case you would expect it to be on a timer or stop on another button press which is also a fine trigger.

    Thank you so much for you time and patience!

    I got it! thanks :) <3!

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