A problem with animation starting with last frame

Game Editor comments and discussion.

A problem with animation starting with last frame

Postby lverona » Fri Feb 08, 2013 11:31 am

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?
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby skydereign » Fri Feb 08, 2013 7:18 pm

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Fri Feb 08, 2013 8:24 pm

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.
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby skydereign » Fri Feb 08, 2013 8:36 pm

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Fri Feb 08, 2013 8:46 pm

Has 8 frames. It either starts with frame 1 or frame 8.



Will try the NO_Change thing and report back.
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Fri Feb 08, 2013 8:54 pm

NO_CHANGE solves the problem... but what is going on here, I wonder?
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby RippeR7420 » Sat Feb 09, 2013 4:25 am

I have experienced the same problem! It would be nice to know how to fix it. :)
Last edited by RippeR7420 on Sat Feb 09, 2013 7:13 am, edited 1 time in total.
CURRENT PROJECTS:

-Olo: The Sword Shaman http://game-editor.com/forum/viewtopic.php?f=4&t=12919

-The Wrath of Blob: (On the back burner)

-StickMcGee - Blast to the Future http://game-editor.com/forum/viewtopic.php?f=4&t=13660
User avatar
RippeR7420
 
Posts: 391
Joined: Mon Apr 27, 2009 4:16 pm
Location: Salt Lake City, Utah.
Score: 23 Give a positive score

Re: A problem with animation starting with last frame

Postby skydereign » Sat Feb 09, 2013 4:28 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Sat Feb 09, 2013 9:55 am

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.
Attachments
AnimationBug.zip
(15.46 KiB) Downloaded 104 times
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby lcl » Sat Feb 09, 2013 6:20 pm

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.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Sun Feb 10, 2013 7:59 am

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.
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby lverona » Thu Feb 21, 2013 9:23 am

So, sky, any update on that? Did my example app help?
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: A problem with animation starting with last frame

Postby skydereign » Thu Feb 21, 2013 7:02 pm

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).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest