User Tag List

Results 1 to 6 of 6

Thread: A Random Number Generator from a Pool

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A Random Number Generator from a Pool

    Hi folks - hoping someone might help me with this maths problem for which I cannot seem to come up with a good solution.

    I have a pool with the total value being 15 points.

    I want to spread the 15 points over 6 objects but not divide the points equally and each object can have no more than a total of 5 points each.

    For e.g. you could have 2 4 1 0 5 3 = 15 but you could also have 5 5 5 0 0 0 = 15 etc.

    Any help gratefully recieved!

    Thanks

    Rob

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    TheSynapse's Avatar
    Join Date
    Jun 2011
    Location
    London, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Setup an alterable value in your 6 objects.

    Set Value A to -1 in all your objects.

    If "Value A" of object1 + "Value A" of object2 + ..... etc. is less than 15
    And
    Value A in an object = -1
    THEN
    set value A to random(4)+1.

    If sum of all values =15 and there are objects with -1 still, set those remaining values to 0.

    You may have to use the foreach object for this. I'm still a newbie myself, but that's how you'd break the problem down into its parts.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is this what you're looking for?
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gkinfinity View Post
    Is this what you're looking for?
    That is pretty close to what I'm after - I should have been clearer in my description but the objects are in fact counters so I cant use alterable values because counters cant be assigned alterable values.

    So I wanted to have 6 individualy named counters displaying the values as numbers.

    I'm trying to rework your suggestion to fit my project but failing to do so as of yet!

    Thanks for the suggestions though.

    Rob

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh ok. You can actually use the same method by adding all of the counters to a qualifier. Here's the updated version.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gkinfinity View Post
    Oh ok. You can actually use the same method by adding all of the counters to a qualifier. Here's the updated version.
    Perfect - works exactly as I wanted. Thanks for your help.

    Still new at MMF and had'nt even seen the qualifiers. So much potential!

    Thanks again.

Similar Threads

  1. Random Pool?
    By diefox in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 1st August 2013, 06:54 PM
  2. Make Random Pool not-so-random?
    By UltraHammer in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th April 2013, 02:53 PM
  3. Random Number generator
    By RoachLIVEinLA in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 22nd July 2009, 02:16 PM
  4. Random Number Generator
    By bkfitww in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 9th December 2006, 11:30 PM
  5. Possible bug with random number generator
    By MJK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th November 2006, 06:27 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
  •