The Daily Click ::. Forums ::. Klik Coding Help ::. Animation won't play... why?
 

Post Reply  Post Oekaki 
 

Posted By Message

Corny



Registered
  26/10/2003
Points
  232
4th September, 2007 at 07:40:10 -

Hi,

even though I disappeared for a long while, I'm still working on my game when I have the time to do so. Like the last few days.

But now I encountered something I can't fix for the sake of it and I kindly request someone to help me... again.

Whenever the character in my platform-game "Saes" enters a door, an animation plays where you see him disappearing in the door (the animation is called "up and down" and is part of the main character sprite). When this animation is finished, the player character disappears and reappears at the next door. Simplistic - an it always worked, until now.

I created a new level and didn't change anything concerning the "door-engine" itself... but for unkown reason, the program won't play the "up and down" animation anymore, wrecking up the whole engine because you can't enter doors anymore. Even if I just implement something like "if pressed "A", then play animation "up and down"" it won't play the animation. Hrrr.... even when I make a whole new animation, give it another name and copy the animation frames from "up and down" to "new", it won't play it O_o

It all still works in any other level, though. I don't know why this doesn't work anymore, because anything else which is new in the level works like a charm. Is there any way how I could fix it without having to rebuild the whole level from a old level without the bug? It would throw me back many hours, because in this new level, much new stuff was added...

thanks in advance

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
4th September, 2007 at 10:21:43 -

Did you change anything about the animation itself? Might check out the sprite and its speed.

Btw, don't rely on animation too much to time things like entering an area, you might want to use a counter/alt value to time it instead.

 
Old member (~2004-2007).

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th September, 2007 at 11:00:53 -

Look at your code where it tells the sprite to display the "stopped" animation, and make one of the conditions "if animation up / down is not playing". If that doesn't help, sometimes I have trouble with animations that aren't looped. If that's the case, you may have to put another line in there like "If animation up / down is playing and current animation frame >= (the ending frame of up / down's animation) then change to.."

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Corny



Registered
  26/10/2003
Points
  232
4th September, 2007 at 12:34:42 -

Thanks for your help, but at the end, it was something different.

I added some code for making the maincharacter push a barrel. Since the push animation didn't stop looping when the pushing itself was over, I added something like "if maincharacter isn't overlapping barrel, then restore the animation". Well, it restored. In fact, it restored any animation that wasn't looped. So I added a "AND animation pushing ist playing" and now everything works again. Thanks for your help and listening to my noobish problems ^^

Regarding the counter/alt value thingie :
This ist in fact my 3rd playable project, the first being a crappy Tank-Clone, done with KnP, the second one a Dress-Up Game (which I never put on TDC because I didn't knew if the admins like female cartoonish nudity) and this being the 3rd one. I've been really consequent with myself, after some games I worked on that were never playable, so I told myself "pull it through, don't stop". As a consequence, much "code" in this one is almost 1 1/2 years old now, and if it wasn't already that far in, I would use counter/alt value stuff.

I'm going to definiately use counter/alt values as soon as this project is finished and the next one begins Furthermore, I plan to reward myself in buying MMF2 or TGF2 as soon as this one is finished ^^

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
4th September, 2007 at 12:46:01 -

(Oh wow, the post preview thing just improved! )

Old code eh? If you can, try to replace some of the code. But I guess events in Click products are usually too closely related to eachother to be able to do that correctly without a bit of hassle.

Oh yeah, the "looping animations that don't stop" thing is annoying. >_<

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click