Hello Guest

Author Topic: Stopping animations,  (Read 2582 times)

0 Members and 1 Guest are viewing this topic.

Izach

  • Member
  • Posts: 8
    • View Profile
Stopping animations,
« on: April 05, 2014, 04:13:01 PM »
Simple idea I had when messing around with Otter today.

In a situation like this:
sprite.Add("animation", new int[] { 0, 1, 2, 3, 4 }, new int[] { 5, 8, 12, 6, 0 });

When playing this animation once the run-time hits the "0" it freezes.

My idea is that when the animation gets to the "0" it should simply stop the animation on the frame, instead of freezing or the alternative: looping.

This idea may be crazy and they may already be a way to do this but I just thought this would be a cool feature, one that I would use.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Stopping animations,
« Reply #1 on: April 08, 2014, 03:34:15 AM »
Yeah, it should work this way.  I'll look into this!

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Stopping animations,
« Reply #2 on: April 08, 2014, 02:49:51 PM »
Oh I think actually this behavior is already in.  Try this:

Code: [Select]
sprite.Add("animation", new int[] { 0, 1, 2, 3, 4 }, new int[] { 5, 8, 12, 6, 0 }).NoRepeat();

Izach

  • Member
  • Posts: 8
    • View Profile
Re: Stopping animations,
« Reply #3 on: April 08, 2014, 05:56:39 PM »
Ah, nice!

Thanks Kyle!

When testing to see if it worked I pressed the Tilde key and Bam! I was amazed!

Apparently Otter has a super amazing debug system build in!