Found how to make animation names work

This forum is currently in read-only mode.
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • This isn't exactly the optimal method, because if you need to rename it later, you have to recreate the animation. But it works. Mostly.

    Create a new game, insert a sprite. Close the image editor. Click on the animator tab, then right click on 'angle' under the animation name 'Default'. Click remove. Right click default, click add new angle. Click add on the box that appears.

    Then, before adding frames - that's important - Click on angle under default again, and look in the properties panel. What's that? Another animation name! The one that construct actually uses and that shows up in the debugger. Enter the animation name you want, then go about importing frames.

    The conditions "if animation "animationname" is playing" will work again. Unless you use numbers in the animation names, which for some reason get ignored at runtime ("attack1" reads back as "attack").

    You have to set the animation name before importing the frames, because that's the only time the box is accessible. It's the angle names that are returned, not the animation names.

  • The question I have is, when the original problem is fixed, will this workaround cease to function? I'd hate to change all my animations now just to have to go back and do it again in .95+

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Good point. Maybe it's better to stick to using a private variable.

  • I've got to hand it to you, though. Great find! May yet be useful if a dev could stop by and clear things up.

  • True, it at least points to the fix.

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