Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: TheDerman on February 16, 2006, 12:20:51 PM

Title: Animated sprite not animated after computer restart
Post by: TheDerman on February 16, 2006, 12:20:51 PM
Hi,

I've encountered something which seems like a bug...

First, a little background - I have an animated sprite as one of my inventory items - basically I have an item (a non-animated sprite), and when I right click on it in the inventory, it swaps with another item (an animated sprite version of the same item) - then when I right click again, it swaps back.

For this swapping, on the non-animated version script I'm using:

  Game.DropItem("itemA");
  Game.TakeItem("ItemB");

...and then I reverse the code on the animated sprite script to swap back.

That all works fine, and the animated sprite looks great in the inventory. But, when I come to save the game with the animated sprite in the inventory, there is a problem. If I save, quit the game, then restart the game, it's fine, the sprite it still animated, no problem. BUT, if I quit the game, then turn off my computer, then turn it back on, and start up the game, the sprite it no longer animated - it just displays a single frame from the animation.

This only occurs with the inventory animated sprite, not with any others in the scene, and it occurs in both ProjectMan and the compiled game.

So, any ideas? A bug? Something I'm doing wrong with the sprite?

Thanks.
Title: Re: Animated sprite not animated after computer restart
Post by: Mnemonic on February 16, 2006, 01:04:30 PM
Hmm, that's strange. I think I know what causes this, but it shouldn't happen in this case. How does your inventory work, is it an exclusive window?
Title: Re: Animated sprite not animated after computer restart
Post by: TheDerman on February 16, 2006, 01:13:36 PM
Hmmm, I'm not sure about that - there's no mention of anything being "exclusive" where the inventory is concerned. Basically, I just run that FadeIn script (which we worked out a while ago) in the game_daemon script when the cursor is at the bottom of the screen.

I should also add that the sprite only does not animate if I LOAD the save game after restarting the computer. If I start a new game, everything is fine.
Title: Re: Animated sprite not animated after computer restart
Post by: Mnemonic on February 16, 2006, 01:28:12 PM
Ok, I found the problem, I'll fix it ASAP. Thanks.
Title: Re: Animated sprite not animated after computer restart
Post by: TheDerman on February 17, 2006, 10:20:40 AM
Cool thanks - Mnemonic, you are the greatest.  ::rock

Any idea when it might be fixed though?  And how about that other entity interaction cursor thing I posted about - any idea when that might make an appearance? 8)
Title: Re: Animated sprite not animated after computer restart
Post by: Mnemonic on February 17, 2006, 10:32:57 AM
It should be in WME 1.6 beta 3, which will be released "when it's done(tm)" ;)
Title: Re: Animated sprite not animated after computer restart
Post by: TheDerman on February 17, 2006, 11:24:52 AM
That's cool - I can wait for the cursor thing, but any chance you can fix the animated inventory sprite problem and release a quick update or something? I have a looming deadline you see.

Of course I have no idea how hard it is to fix, so I understand if it has to wait.

Whatever, WME is still the best - woohooooo.  ;D
Title: Re: Animated sprite not animated after computer restart
Post by: Mnemonic on February 17, 2006, 08:05:48 PM
Ok, try this: http://dead-code.org/download/wme_latest.zip
Title: Re: Animated sprite not animated after computer restart
Post by: TheDerman on February 17, 2006, 08:43:58 PM
Excellent - works perfectly now.

Thanks man.  ::rock