Author Topic: Playing Animation Frames in a Different/Random Order  (Read 2100 times)

Rafe

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Playing Animation Frames in a Different/Random Order
« on: July 29, 2012, 03:50:04 AM »
Hi,

I need to make two animations out of the same sprite-frames. The first is just the sequence in order, which works fine. For the second I want to play the frames randomly. Is there a way to do this without adding the frames to the atlas with a different name?

Cheers,

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Playing Animation Frames in a Different/Random Order
« Reply #1 on: July 29, 2012, 04:01:19 AM »
Don't use the UISpriteAnimation for that. Just write a small script that will do just that -- randomly pick a sprite from a list of your choosing.

Rafe

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Playing Animation Frames in a Different/Random Order
« Reply #2 on: July 30, 2012, 02:42:00 AM »
Funny, as I was falling asleep I realized how easy it would be to do as you suggest. Thanks for the reply!