User Tag List

Results 1 to 5 of 5

Thread: Object Random Picker Algorithm.

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    AlanRuno's Avatar
    Join Date
    May 2013
    Posts
    334
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Object Random Picker Algorithm.

    So. I'm trying to improve my app functions.
    I use MMF default "Pick object at random" function.
    But it seems that the randomness isn't what my users expect.
    Sometimes the same objects get selected (A from a list of 54 , I get 5 or 6 always repeating objects, sometimes in the same sequence)

    So how can I improve this? Does "Randomize" action change the pick object seed?
    Is there another way I can pick an object with a more randomized way?

    Hope I get a response.
    Thanks

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Use spread value to give each object a unique id, and then use one of the random number generator extensions to pick an object by its id.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    AlanRuno's Avatar
    Join Date
    May 2013
    Posts
    334
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Does that action spread unique numbers to each object? I didn't know that.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    AlanRuno's Avatar
    Join Date
    May 2013
    Posts
    334
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well.. Indeed it does. But Once I select an object, I destroy it. So I can select the next one without having to code a "Pool" .
    If I use ID's to select objects, I would have to code a pool filter.
    If there is a way to improve random picker, It would save me some code.

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Just spread the value again before you pick another.

Similar Threads

  1. Current random number algorithm?
    By 2xD in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd September 2015, 07:43 AM
  2. Fixed list object picker view height
    By Raudaschl in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 10th January 2014, 05:01 PM
  3. 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
  4. New Android Dialog Object - Date Picker
    By macca02 in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 16th October 2013, 02:51 PM
  5. List object (Picker) size
    By MJK in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 15th May 2012, 11:22 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
  •