Jump to content

  • Log In with Google      Sign In   
  • Create Account


XNA Frame animation problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 povilaslt2   Members   -  Reputation: 201

Like
0Likes
Like

Posted 29 August 2012 - 11:34 AM

Hello how could i can solve that problem. When i run my game, and my sprite is doing an animation sprite moves. And I want that my sprite stand in place when animation is in action.

My Game: https://rapidshare.com/files/3393897454/WindowsGame1.rar

Sponsor:

#2 TheResolute   Members   -  Reputation: 187

Like
0Likes
Like

Posted 29 August 2012 - 11:46 AM

Please include some more detail about your problem to be clear

However, I will attempt to help at this point based on what I think is happening
If your sprite normally moves around by player input or AI or something like that, all you would have to do is: add a isPlayingAnimation variable to your code an relate it to your sprite somehow; add a statement to the code that begins an animation to set that variable to true; and include a condition in its movement code that checks whether it is playing an animation, and doesn't execute movement if it is

Another thing that occurred to me is that your is constantly on an animation loop, and you want to stop it during a certain part of that animation; in that case, you would add a counter to its movement code that increments every frame, is reset when the animation restarts, and then a condition to the code that prevents movement when the counter is in a certain range

Hopefully you will find at least some of that helpful

#3 povilaslt2   Members   -  Reputation: 201

Like
0Likes
Like

Posted 30 August 2012 - 12:39 PM

Thanks, i just rebuilded animation system in my way and now it working good Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS