Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Corrupted .X file after loading game?  (Read 3149 times)

0 Members and 1 Guest are viewing this topic.

jackslawed

  • Lurker
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 23
    • View Profile
Corrupted .X file after loading game?
« on: November 21, 2011, 04:40:47 PM »

Hi all
This is one of those dreaded DirectX problems... hard to track down what's going wrong. My 3D actor works perfectly, except after loading a saved game. The idle animation flickers on and off, meaning the actor cannot stand still. The walk animation also gets oddly slowed down, and it looks something like roller-skating. This happens only after loading a saved game, and it happens every time I load a saved game.

I had a workaround where the game unloaded and reloaded the actor every time saves were loaded. This solved the flickering/animation bug, but it has caused serious problems for me in scrolling scenes (layers larger than screen) and scenes where a different actor is supposed to be loaded.

I also tried UnloadAnim() for every animation, then MergeAnim() to essentially replace the anims with a fresh set. Oddly the idle animation begins flickering again as soon as it is loaded.

What happens to the actor3D object when saving/loading? Why would this problem not occur when a new game is started?

Any help/suggestions would be greatly appreciated!!!
Logged

jackslawed

  • Lurker
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 23
    • View Profile
Re: Corrupted .X file after loading game?
« Reply #1 on: November 21, 2011, 07:53:24 PM »

I couldn't find a fix for the .X animation, so I went back to my workaround and fiddled with it. That's likely unhelpful for anyone else, but if anybody is having trouble with odd, possibly buggy behavior using the "AfterLoad" event, try attaching a script with a short sleep command followed by your code, then detach the script. It seems the game script doesn't allow sleep, so this solved the problem I was having with strange actor positioning after loading.
Logged
 

Page created in 0.035 seconds with 20 queries.