Page 1 of 1

A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 11:31 am
by lverona
Here's what is the situation. I have a ship actor. I shoot it, it sinks. The problem is with sink animation. From time to time it starts with the last frame. In fact, this is not the first time I notice this in gE, an animation starting with the last frame. Is there any way to rewind it to frame 0 and make sure it plays it from the start?

Re: A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 7:18 pm
by skydereign
What type of animations are you using? Sequences, or regular strip animations? Also, when you change them, do you set it to animation state to FORWARD?

Re: A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 8:24 pm
by lverona
1. What type of animations are you using? Sequences, or regular strip animations?

Probably sequences, I am not sure of the terms. I have smth1.png smth2.png smth3.png and I add an animation, indicating "Multiple files".

2. Also, when you change them, do you set it to animation state to FORWARD?

Yep.

Re: A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 8:36 pm
by skydereign
lverona wrote:Probably sequences, I am not sure of the terms. I have smth1.png smth2.png smth3.png and I add an animation, indicating "Multiple files".

That's multiple frames. Sequences is when you use sprite sheets.

lverona wrote:2. Also, when you change them, do you set it to animation state to FORWARD?

Yep.

Try setting it to NO_CHANGE, that seemed to work for happyjustbecause, though I believe technically it shouldn't. I don't remember seeing this problem myself, but I do remember people mentioning it before. The version I encountered was it would always jump to the second frame, which is because ChangeAnimation with FORWARD should set the frame back to 0 (but immediately switches to the next frame). But if you set it to the last frame that is fixed, and was fixed in 1.4. But perhaps that introduced this problem. How many frames does your animation have?

Re: A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 8:46 pm
by lverona
Has 8 frames. It either starts with frame 1 or frame 8.



Will try the NO_Change thing and report back.

Re: A problem with animation starting with last frame

PostPosted: Fri Feb 08, 2013 8:54 pm
by lverona
NO_CHANGE solves the problem... but what is going on here, I wonder?

Re: A problem with animation starting with last frame

PostPosted: Sat Feb 09, 2013 4:25 am
by RippeR7420
I have experienced the same problem! It would be nice to know how to fix it. :)

Re: A problem with animation starting with last frame

PostPosted: Sat Feb 09, 2013 4:28 am
by skydereign
Can someone post a simple ged of the problem? Or is it something you can only replicate in large cases? It'd help for, if not finding a solution within the game, fixing the bug causing it in the gE source.

Re: A problem with animation starting with last frame

PostPosted: Sat Feb 09, 2013 9:55 am
by lverona
Sure.

I have attached a ged file and pngs to test.

Press Q to create object. Press W to destroy it. You will see a sinking animation. Do it several times and typically on the third or fourth time you will see it blink.

Re: A problem with animation starting with last frame

PostPosted: Sat Feb 09, 2013 6:20 pm
by lcl
The error seems to happen when you press W when the ship is in its normal animations last frame.
I would also like to know why this happens.

I tried renaming your animation files in a way that the numbering should be clearer, in case that it was confusing GE, but that didn't help.
I added 0's before the animation frame numbers, so that file names were like ship01. I did this because I have had issues with animations that have more than
10 frames. GE will not recognize the numbers right if the largest is at least 10 and the other ones don't have a 0 in front of the numbers.

But it seems that the bug I mentioned has nothing to do with this one.

Re: A problem with animation starting with last frame

PostPosted: Sun Feb 10, 2013 7:59 am
by lverona
lcl wrote:The error seems to happen when you press W when the ship is in its normal animations last frame.


Ah, nice observation! Maybe this is the root of the problem.

Re: A problem with animation starting with last frame

PostPosted: Thu Feb 21, 2013 9:23 am
by lverona
So, sky, any update on that? Did my example app help?

Re: A problem with animation starting with last frame

PostPosted: Thu Feb 21, 2013 7:02 pm
by skydereign
lverona wrote:So, sky, any update on that? Did my example app help?

Well I have been able to see it, but I've been too busy to take a serious look into the source. It does however act oddly enough that it is a bug. So, it may still be a while, and even then, makslane doesn't want any more releases of 1.4 now that the 1.5 code has been merged into the repository (and 1.5 isn't coming any time soon by the looks of it).