User Tag List

Results 1 to 5 of 5

Thread: Random Animations

  1. #1
    No Products Registered

    Join Date
    May 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Animations

    I am trying to emulate the randomness of unit portraits like in typical RTS games. I have 4 seperate different .gif animations of the unit. I was wondering how I could make the unit play 1 of those .gifs at random each time it finishes animating 1 .gif. Any suggestions?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Animations

    Use flags and Alt Values.

    Alt Value = 1
    Flag 1 is on
    -Turn Flag 1 off
    -Play 1st animation

    Etc...

    Animation 1 is over
    -Set alterable value to Random(3)+1
    -Turn Flag 1 on

  3. #3
    No Products Registered

    Join Date
    May 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Animations

    This seems to work only when the random animation to be played is not the same animation that was just playing. It stops the cycle if for example animation 1 is finished and the radnom generater picks animation 1 to be the played next

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export Module
    Chaos's Avatar
    Join Date
    Aug 2006
    Location
    Burnsville, MN, USA
    Posts
    806
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Animations

    I don't know why but I always seem to have trouble with flags.

    So perhaps try this:
    Animation 1 is finished --> set Alt Val A = Random(3)+1

    Alt Val A = 1 -->
    Change Animation 2
    +Set Alt Val A = 0

    Alt Val A = 2 -->
    Change Animation 3
    +Set Alt Val A = 0

    Alt Val A = 3 -->
    Change Animation 4
    +Set Alt Val A = 0

    Animation 2 is finished
    or
    Animation 3 is finished
    or
    Animation 4 is finished -->
    Set animation to Animation 1

    That should work, its how I have the idle animations for my character set up.

  5. #5
    No Products Registered

    Join Date
    May 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Animations

    Worked perfectly, thanks a ton!

Similar Threads

  1. Random Active Spawn in Random Location in Frame
    By Top_of_the_Temple in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th October 2016, 03:33 AM
  2. Random object spawning random y set x
    By Armiferamortalis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd December 2013, 11:47 AM
  3. BUG: Random is not random in Flash mode
    By oldkliker in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 11th October 2011, 08:56 PM
  4. Random and MT Random strange behaviour
    By crusher in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 8th October 2011, 01:32 PM
  5. Random Speed + Ypos at random times
    By Keehan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th May 2011, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •