User Tag List

Results 1 to 6 of 6

Thread: Random counter help needed

  1. #1
    Clicker Multimedia Fusion 2
    Skeets's Avatar
    Join Date
    Apr 2007
    Location
    Utah, USA
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random counter help needed

    Ok, I am making a space game with power-ups, and I want them to give you a random power-up. I don't want it to be the same one they already have. I don't know how to do this. I am using a counter that is a random number which stands for a power-up, but if it is 2, I don't want it to change to 2. I would rather not change the counter to somthing else if possible. Thank you!

  2. #2
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random counter help needed

    There are a couple ways to do this. The most logical would be using the random pool object, because it can pull out numbers without repeating them. If you need more help than that just ask.

  3. #3
    Clicker Multimedia Fusion 2
    Skeets's Avatar
    Join Date
    Apr 2007
    Location
    Utah, USA
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random counter help needed

    After thorough testing, I have determined that random pool is not random. It goes in order every time, 1,2,3. Another problem I have been haveing with this is when to refill the pool. If you do it to early, the next power-up you could pick up could be the same. If you do it to late then the one after that could be the same. Any other suggestions?

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random counter help needed

    Use 2 counters. 1 for the random number. And one for what could possibly be the next random number as long as it isn't the same.

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random counter help needed

    You forgot to randomize it at the start of the frame. And you only refill it when the pool is empty, so you can only get one you have already gotten if you have gone through all of the others.

  6. #6
    Clicker Multimedia Fusion 2
    Skeets's Avatar
    Join Date
    Apr 2007
    Location
    Utah, USA
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random counter help needed

    Sorry Brandon, I couldn't get that to work. I did get LazyCoder's to work though, and It works perfectly!... I did change it a bit though... Thank you!

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. HELP NEEDED! Rockman X [Megaman X] Dashing Help needed.
    By Rockman in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 30th July 2013, 07:05 AM
  3. BUG: Counter set to aways (random) it's not working
    By paobrasil in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 8th April 2013, 10:48 PM
  4. [BUG] Counter not setting aways>random
    By paobrasil in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 19th October 2012, 01:12 PM
  5. Adding Half a Counter's Value to Another Counter
    By soloman in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th June 2010, 10:30 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
  •