The Daily Click ::. Forums ::. Klik Coding Help ::. Change animation frame
 

Post Reply  Post Oekaki 
 

Posted By Message

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
13th September, 2005 at 13:47:03 -

I am about to sync the legs and body of a character, and I though, why not use the change animation frame action. So the i did lie: 'Body: set animation frame(animation frame(Legs)) kind of. But it bugs the crap out of my game. Suddenly backdrops are dsplayed at random positions over the screen and, well, it's all wierd. What's the problem?

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
13th September, 2005 at 17:36:18 -

couldnt you just run the animations at the the same fps, wouldnt that work better.
maybe the problem is the extrem marginal difference i times, ie the legs set there animation frame to the same as the body, so the body would be the first to change by a split second, although it would be very marginal it could still cause problems. as for the other random stuff apearing, i have no idea. sounds weird!

 
n/a

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
13th September, 2005 at 17:45:08 -

I do run them at the sam fps. the problem is that if I choose to attack while running.. the body should attack and the legs should keep on running. And when the body is done attacking, it goes back to the running animation and syncs with the legs

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
13th September, 2005 at 18:46:05 -

Well, if you don't have many frames per animation and don't have many directions per object, you could do the cheap method of putting each frame on its own direction, having a single counter take care of the pacing, and aligning them appropriately with that.

Like, say you have 8 frames of animation... they'd go in directions 0-7 for facing right, and 16-23 for left. You could then have a counter (maybe the alterable value of one of the objects) counting like such:

- set "value" to ( "value" + 1 ) mod 32

(32 so that it's a new frame ever 4 loops.)
And then the animating objects align thusly:

- set direction to int( "value" / 4 ) + dir("something")

("something" being the player object that reliably faces one direction or the other.)

And, well... you get the idea.

 
Go Moon!

Dave Matthew (Jester Gaming)



Registered
  09/07/2004
Points
  148
13th September, 2005 at 19:09:41 -

thanks fifth! however, that wouldn't work in this particular case, but you gave me an idéa of another aproach which I will test now!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click