The Daily Click ::. Forums ::. Klik Coding Help ::. PMO Animation Trouble
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
23rd October, 2012 at 23/10/2012 21:17:51 -

Hey guys

I'm using the PMO and have all my animations working (pretty much), but the Jumping and Falling animations are messing me around. Basically, the falling animation will only play when the character is falling AND moving either left or right. If I stand still and jump, the animation sticks on the first frame, refusing to play the rest.

Any ideas?

 
Image

Tell 'em Babs is 'ere...

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
23rd October, 2012 at 23/10/2012 21:35:39 -

First off, do you have events to handle the animations?
(i.e. if pmo is falling, then play falling animation)

Check the events for your idle animation, for instance, if you have it set to "Player is not moving left or right" and nothing else, it will always play the idle animation if the character isn't moving, even if they're jumping.

With the animation sticking, it might be because it keeps being told to play, instead of saying "Player is jumping, play jump animation" say "Player is jumping and jump animation isn't playing, play jump animation".

But of course, I'd know for sure if you posted an .mfa of the problem area.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
23rd October, 2012 at 23/10/2012 21:52:50 -

Well, this happens with the PMO every time I use it. I get all the regular animations working like so:

IF object is not moving
THEN play stopped animation

IF object is moving
THEN play walking animation

IF object is jumping
THEN play jumping animation

IF object is falling
THEN play falling animation

They all work, except the falling animation. It only works if I'm moving left or right, otherwise it's just one frame. It's always been this way for me, if you make a little test you should get the same problem... :/

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
24th October, 2012 at 24/10/2012 00:01:24 -

Well there is your problem, in the

IF object is not moving
THEN play stopped animation

Add the line
IF object is falling
and negate it by right clicking on it and clicking negate, then essentially it will read

IF object is not moving +
X IF object is falling (which equates to IF object is NOT falling)
THEN play stopped animation

With the jumping you need to add

X IF jumping animation is playing
so it reads

IF object is jumping +
X IF jumping animation is playing
THEN play jumping animation

If that doesn't work then it's probably something else in the code.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
24th October, 2012 at 24/10/2012 10:14:08 -

Thanks for the reply. I'm not on Windows right now so I can't test it right now. I've looked at the changes you've suggested but am not sure you understand what the problem is.

All my animations work fine. Even the falling animation plays. But it only plays the falling animation if the player is moving left or right at the same time. This sounds strange, and it is. If I simply press jump without moving left or right, the falling animation will play just the first frame and stick on it until it lands, and not the full animation.



 
Image

Tell 'em Babs is 'ere...

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
24th October, 2012 at 24/10/2012 16:32:30 -

That's because according to the PMO, "when the object is not moving" simply means pressing the left or right buttons, jumping or falling does not count as moving. When you are jumping and not moving, it still considers that not moving above all, so it is going back and fourth between running the idle animation and the jump/fall animation.

Each tick (since the idle code is above the jump code) it changes the animation to idle, then in the same tick it changes the animation back to jump/falling, visually you will not see the change, but in code it happens. For whatever reason these same rules do not apply to the "when the object IS moving code".

Looking over the code I've done using the PMO, I shy away from using the object is moving/object is not moving lines, I usually write them as

PMO Object is standing on ground
Left key is not pressed
Right key is not pressed
-Play idle animation

PMO Object is standing on ground
Left key is pressed
-Play walking animation

PMO Object is standing on ground
Right key is pressed
-Play walking animation

PMO object is jumping
-Play animation jump

PMO object is falling
-Play animation fall

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
25th October, 2012 at 25/10/2012 00:19:18 -

Thanks Oh hey, Chloe! You'll have to forgive me as my mind actually starts hurting when I have to think even slightly technically. I have a lot going on in my events now so it'll take me a while to think properly about what's going where but I think I know what you mean now.

I'll have a go at this tomorrow!

 
Image

Tell 'em Babs is 'ere...

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
25th October, 2012 at 25/10/2012 02:10:41 -

Does... everyone use that Platform movement object? Ive never touched it and don't really see a reason to.
Just curious.

 
.

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
25th October, 2012 at 25/10/2012 04:07:24 -

I've first used it when I started. Now that I know my way around the code, I use it specifically to cut down on clutter.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
25th October, 2012 at 25/10/2012 09:38:33 -

I don't use the built-in movement because the player will get stuck in the ceiling if you down the hold jump button, and more annoying than that, if you're holding right and try to jump over an obstacle, the player will just jump up as if you're not pressing right.

Because I try to avoid being too technical where possible, I can't make my own movement. So the PMO seems alright for me.

 
Image

Tell 'em Babs is 'ere...

Pan-tosser



Registered
  24/10/2008
Points
  520

Has Donated, Thank You!
28th October, 2012 at 28/10/2012 01:18:07 -

I thought that a lot of that getting stuck in ceilings. Got fixed with the move safely 2 object.

 
https://www.facebook.com/nathon.brown.7

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
5th November, 2012 at 05/11/2012 01:51:32 -

AndyUK - ive both created my own movement/collision engines and used PMO and to be honest i found the PMO gave great results with a fraction of the work, Its great if your not doing anything really strange with your game but you can make it do pretty much everything you would expect from platform games, wall jumps, wall slides, double jumps. I even had a little engine going where you could jump and ground slam (like mario) and it would smash holes in the ground.

Ive never really tried it with realistic physics though so dont know how it holds up there.

I would def use it again if i was to make (and finish) a platform game.

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
18th November, 2012 at 18/11/2012 14:26:36 -

I use pmo any time i make a platformer. it does pretty much anything you could want in a platformer and it keeps it simple. the engine im working on uses the pmo, it has a dash, double jump, wall jump, wall slide and such. also... default movement is terrible. id rather make my own than use the default.

 
[Game design makes my brain feel like its gonna explode.]

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
19th November, 2012 at 19/11/2012 06:59:15 -

I don't think Andy is advocating that you use the default, I pretty sure he's indicating that he uses custom movement engines.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal
   

Post Reply



 



Advertisement

Worth A Click