Found how to make animation names work

For questions about using Classic.

Post » Thu Apr 24, 2008 3:48 pm

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.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Apr 24, 2008 4:05 pm

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+
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Thu Apr 24, 2008 4:14 pm

Good point. Maybe it's better to stick to using a private variable.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Apr 24, 2008 4:15 pm

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.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Thu Apr 24, 2008 4:24 pm

True, it at least points to the fix. :)
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests