Animations frames transition...

For questions about using Classic.

Post » Thu Jan 26, 2012 4:41 pm

Hello there! Could any one help me to figure out a little problem with Construct Classic r1.2 ?

When my hero is standing it playes an "Idle" animation (frame0 -> frame1 -> etc). When I press Down Arrow it have to play a "Seat Down" animation (frame0 -> frame1 -> etc) but in fact it changes only the name of animation-to-play (it takes the number of the currently playing animation frame and starts my "seat down" animation from this frame number!) So, if my hero decide to seat down at Idle's frame = 5, it skips first four frames of "seat down" and my hero turns up sitting down...

Thenks per advance for your help.

.cap http://www.mediafire.com/?pfcavk5p9z8k2a2
Press "S" to seat down
B
7
S
1
G
1
Posts: 9
Reputation: 1,076

Post » Thu Jan 26, 2012 4:46 pm

i think this is more of a feature than a bug

just add a set frame to 0 action along with the seating animation
i think (not sure) that if you do another play animation action it might automatically do this as well
so Set Animation to "Seat Down"
Play Animation

having it keep the same frame is useful sometimes, when transitioning between walking and running animations and such, or several animations that represent multiple angleslucid2012-01-26 16:47:17
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Jan 26, 2012 5:37 pm

[QUOTE=lucid] i think this is more of a feature than a bug

just add a set frame to 0 action along with the seating animation
i think (not sure) that if you do another play animation action it might automatically do this as well
so Set Animation to "Seat Down"
Play Animation
[/QUOTE]

It do not helps... Even if I use "On control pressed" to set the current frame to 0 it makes the hero to hang at this frame while I keep the key pressed.
In fact this "feature" means that when a player will be forced to quickly seat down, he'll be confused because of different speed of action. Really, it looks like a bug...
Can this feature be turned off somehow ?Rainman2012-01-26 17:41:29
B
7
S
1
G
1
Posts: 9
Reputation: 1,076

Post » Thu Jan 26, 2012 6:36 pm

I tried your cap. if you use On Pressed and just add
Play Animation, after Set Animation to "seat down"
it works fine

there seems to be a separate problem with the standing animation, and possibly the animationalert variable

lucid2012-01-26 18:38:41
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Jan 26, 2012 8:21 pm

Thanks, but I found a solution:

It's a bit heavy, but it works fine with my method of animations organisationRainman2012-01-26 20:25:50
B
7
S
1
G
1
Posts: 9
Reputation: 1,076

Post » Thu Jan 26, 2012 8:48 pm

Why does everyone try to set an animation's frame to 0 although the first frame is 1 (CC is one-based)? I'd say, 0 is just undefined and wouldn't recommend using it.
It leads to aftereffects, e.g. in this example above the second condition of event 15 is meaningless, because the animation frame will never be 0 and the condition therefor always be true.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Fri Jan 27, 2012 6:34 am

[QUOTE=tulamide] Why does everyone try to set an animation's frame to 0 although the first frame is 1 (CC is one-based)? I'd say, 0 is just undefined and wouldn't recommend using it.
It leads to aftereffects, e.g. in this example above the second condition of event 15 is meaningless, because the animation frame will never be 0 and the condition therefor always be true.[/QUOTE]

First of all, using CC debugger I saw, that all animations use frame number "0" to start playing, so I've decided that Construct's engine must reference to "0" for the first animation's frame.
Secondly, my example above works fine, so... It just works.
B
7
S
1
G
1
Posts: 9
Reputation: 1,076

Post » Fri Jan 27, 2012 7:42 am

First of all, It's totally up to you to ignore the information. That doesn't change anything, CC keeps being one-based, you will just run into more issues with your projects growing. But that's totally your decision.
Secondly, noone said it wouldn't. I just pointed out that event 15 uses a redundant condition. "Animation frame not equal to 0" is always true.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Fri Jan 27, 2012 2:01 pm

You was totally right, tulamide. It should look like this:
B
7
S
1
G
1
Posts: 9
Reputation: 1,076


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests