How do I fix this???

0 favourites
  • 2 posts
From the Asset Store
**** Fully animated eyeball enemy game sprite *****
  • every time the player goes to the next layout the "walking" animation stop is there any code to fix this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There may be a way to achieve this using a global variable for instance instead of making the walking animation play when moving left or right set it so that when pushing the left or right key set WalkingAnim=1 and if not pressing either key wait 0.1 second and set it to 0. then make events such as if WalkingAnim=1 play walking animation and if 0 play idle. Because the animation is being controlled by a global variable what should happen is so long as you're holding left or right the global is 1 so even if switching to another layout the variable will still be telling it to "walk". That being said you will need to add the if WalkingAnim=1 do this if 0 do that to every event sheet that effects the player. You can also tell new event sheets to also include the main event sheet's actions providing that doesn't mess things up for you. I will work on an example and post a link when I get a chance. Hope this helps.

    **EDIT** Sorry I wrote this early in the day. Each Layout typically has it's own event sheet so what's happening is you go to the next Layout and that Layout's event sheet doesn't know how to animate the character when keys are pushed if that makes sense. You would either have to also include the event sheet that has those events are copy/paste the when key pressed do anim into every event sheet. The include event sheet is where add global variable is.

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