User Tag List

Results 1 to 5 of 5

Thread: Playing Random Animation

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Playing Random Animation

    I know I've been asking many questions lately, so I hope you will bear with me.

    I have obj A, with animation 1 and animation 2, and then other animations like walking, standing, ect. When the timer reaches 3 seconds, I want obj A to play either anim 1 or anim 2- I want it to choose one randomly. Might anyone tell me how to do this?
    Thank you all again!

  2. #2
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Playing Random Animation

    You just want to change the animation after 3 secs? No idle animation for a jumpnrun or whatelse?

    Timer is equal 3 seconds:
    - Make an Event "Animation->Change->Animation squence..."
    - Click on "Use a calculation"
    - Enter 12+random(2) (12 is the number of the first custom animation, if you took one like "Stand up", replace it with the number of animation you want to have; 0 = stopped, 1 = walking etc... random(2) returns either 0 or 1.)

    There you go.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Playing Random Animation

    I really appreciate the help. I'm a bit confused though...
    "12 is the number of the first custom anim"
    So what you mean is, I should count my animations, starting at 0 being stopped, and move down the list to see what "number" my first animation is? In that case, it's 22, so enter "22+"?

    "You just want to change the animation after 3 secs?" Well what I'd really like is to have the animation change every 7-20 seconds (having it choose a number between 7 and 20)

    "replace it with the number of animation you want to have". Well number 22 is one animation I'd like it to play, but I want it to randomly choose between 22 and 23. Also, sorry, but I didn't understand when you said "random(2) returns either 0 or 1.)"
    would you mind explaining that a bit more?

    I also though I might as well ask another question about playing random samples. I have about 10 samples, called o1.wav, o2,.wav, ect. They are in the root directory of MMF. Here's the code I'm using:
    ".o"+Str$(Random(7)+1)+".wav"

    I don't know what the problem is- they simply won't play when they should. I'd appreciate any tips.
    Thanks!

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Playing Random Animation

    Enter 22+random(2) that should work.
    I said "random (2) returns either 0 or 1", because you cold think it returns 1 or 2. So it always would be the 23rd or 24th# animation.

    Well, to the samples:

    Try Appdir$+"o"+Str$(Random(7)+1)+".wav"

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Playing Random Animation

    Thanks again. Well I did what you suggested, and it seemed to work. However, it created another problem. When either 22 or 23 anim plays, and when it reaches a certain frame, the object is supposed to appear at a different position, but it doesn't now. But I found a work around using the random sample code, so it's ok.

    I'm still having a problem with the random sample playing though. As I tried both your suggestion, and as no one found fault in my "".o"+Str$(Random(7)+1)+".wav" yet, I don't know what else to say... it just isn't working.

Similar Threads

  1. disappering animation not playing
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th May 2010, 09:49 PM
  2. Playing with random sample frequency
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th July 2008, 04:52 PM
  3. Random Sample not playing
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st June 2007, 08:29 PM
  4. playing a Random Sample- possible?
    By mussashimits in forum The Games Factory 2 - Technical Support
    Replies: 12
    Last Post: 15th April 2007, 11:06 PM
  5. loading and playing a random file
    By Larry in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th December 2006, 11:57 AM

Posting Permissions

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