The Daily Click ::. Forums ::. Klik Coding Help ::. Animation overriding another
 

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 March, 2013 at 23/03/2013 19:17:15 -

Hi guys, me again as per usual.

I have a pushing block mechanic almost working in my game, but I'm about to drop it as I've not been able to correct this animation problem with it. It's been a problem for weeks. Here's a screenshot of the events:

Image

As you can see, there is an event which sets his animation to "Pushing" when overlapping a block, and another event that sets his animation to "Pushing (Stopped)" when overlapping a block. It's meant to display the correct animation based on weather the player is holding down the movement buttons, or if they're not holding them down.

At the moment, which ever animation started playing first takes priority, and it will not switch to the other one when pressing/releasing the keys. Any ideas on how I can correct this?

 
Image

Tell 'em Babs is 'ere...

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
23rd March, 2013 at 23/03/2013 23:02:13 -

My guess would be that it's related to the size of your actual animation frames - so once the character switches to one of the pushing animations, they no longer overlap the block.
I always use embedded detectors to avoid that sort of problem, as the collision area then doesn't change depending on the animation (disabling fine collision detection is similar).

btw: Don't post screenshots from the event editor - a bunch of big ticks tell us nothing. Try the event list editor instead (in fact, I'd recommend you don't even use the event editor - the event list editor is so much better).

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
23rd March, 2013 at 23/03/2013 23:40:30 -

I have a detector set up that is which the platform movement is set to, then the animation is a separate active over the top of it. It's large enough to always overlap the box. I don't think anyone can help me with this, my Animations events list has gotten huge and although it's commented it's still very confusing.

I'll remember about the event list from now on. Really I was posting it just so you could see the event, as I always struggle to type them out accurately.

Edit:
I've just edited this post about 3 times with different test results. Almost got it working, but only from one side, and with events/actions that seemingly shouldn't have worked. I've deleted the entire mechanic now. I might try and implement it again from scratch at some point, but this current method was incredibly messed up. Ahh well...

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th March, 2013 at 24/03/2013 01:32:30 -

The only other thing I can think of would be to try and separate the conditions and actions, so you test all the conditions before carrying out any of the actions - just to be sure that events aren't influencing one another.
I don't know if that would help, but it might be worth a try...

+ Always
-> Player: Set Push to 0

+ Player overlapping Block
-> Player: Set Push to 1

+ Moved left
-> Player: Add 2 to Push

+ Moved right
-> Player: Add 4 to Push


+ Player: Push = 1
-> Player: Set animation to Pushing(Stopped)
-> etc...

+ Player: Push = 3
-> Player: Set animation to Pushing(Left)
-> etc...

+ Player: Push = 5
-> Player: Set animation to Pushing(Right)
-> etc...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click