Endless Animation [Idea]

captaincomic

  • *
  • Posts: 6108
Okay, if it's also not working on Desktop, I can test it as well a bit later today.

captaincomic

  • *
  • Posts: 6108
Hm, it's working for me on Mac Desktop.

mguido730

  • Posts: 600
Are you using debug mode (Debug>Advanced) or just running on standalone?
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

captaincomic

  • *
  • Posts: 6108
Just standalone, but since it was working it shouldn't make a difference.

mguido730

  • Posts: 600
I have no idea what you did differently but i just tried with the most recent version of the behavior(I don't know why i didn't download it before) and it works on standalone and android now.
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

captaincomic

  • *
  • Posts: 6108
To be honest I also have no idea. I only added stop/reverse options, but anyway, it's good that it works now. :)

mguido730

  • Posts: 600
I've come across a bug with the behavior. It's rare, but sometimes it will skip to the wrong animation, ignoring the order that is set in which it needs to be played. If you have any actors in any of your games that you have this attached to(with the "stop" option selected, in case that makes a difference), try putting them in a test scene and have them play through the animation that has been broken up and keep reloading the scene. Eventually you'll see that it skips to the wrong animation.

Edit: I've noticed that it seems to happen primarily to animations split up into only 2 parts but i've also seen it happen to one that was split up into 10.

« Last Edit: December 30, 2012, 07:11:03 pm by mguido730 »
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

captaincomic

  • *
  • Posts: 6108
Hm, I can't seem to reproduce this. Could you attach/send me the game where this is happening?

mguido730

  • Posts: 600
In making this test game for you, i found that it only happens when you're trying to switch to the animation through a behavior. In my game it was only happening when a boss with a large death animation had died. They have the health manager behavior attached to them that i heavily modified in which it asks for a death animation to switch to when their health reaches zero. So i set it up similarly in this test game by just having a behavior switch to the death animation when a custom event is triggered. What's odd is that the bug is actually happening every time I've tested it so far, instead of only every couple of tests like in my game.
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

captaincomic

  • *
  • Posts: 6108
Okay, the problem was that the "do after" was initiated even for anims not in the list, and then when switching to an anim on the list, the "do after" would execute and switch to the next.

I attach a fixed version here. Let me know if it works for you.
(If you use it in the inspector a Current Animation attribute shows up, that is actually hidden, just ignore it http://community.stencyl.com/index.php/topic,18064.0.html)

Btw. it has also a custom block now that let's you switch animation only if it is not already playing an animation with the same prefix. So for example if you have a movement behavior and set the animation in "when updating" to "Left-1" it would not freeze on "Left-1" but still play through "Left-2", etc.

mguido730

  • Posts: 600
That seems to have done the trick, thanks captain
Matt Guido (@guidolatry)

Co-Founder/Programmer at The Automatic Gentlemen.

captaincomic

  • *
  • Posts: 6108
Okay, good. Then I'll upload the new behavior.

zawrot13

  • Posts: 783
Where can I download this behavior to test it in 3.0 beta?


Almakos

  • Posts: 632
This is a very nice behaviour.
I was using animation switcher of my own, but it was producing some collision jumps when animations were switching. But this one works just so well!
Thank you, Captaincomic. huge THANK YOU =)
Fishing Fantasy Trailer