User Tag List

Results 1 to 4 of 4

Thread: How to best solve a random question

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to best solve a random question

    I would appreciate some suggestions from you guys on what would be the best way of solving this.
    I can set it up a complicated way, I'm sure, but I'd rather have a smooth solution.

    [color:green]Here is the set up:
    5 images are shown. One of them is the "right" image the other four are random "wrong" images.
    There is an INI-file with a list (items) of image names. This list can be any amount long. [/color]

    [color:blue]Here is what I want:
    1. I want the "right" image to be randomly placed in one of the 5 image "slots".
    2. The other 4 images are to be selected randomly from the INI-file item list. The "right" image name will be in this INI-file list too and should not be selected (naturally).[/color]

    Any ideas appreciated. [smile]

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to best solve a random question

    I'm sure there are many ways of doing this... I'm trying to think of the least mad-sounding one that takes in all the requirements.

    At the heart of it, you need to pick at random from a list, but be able to control the contents of that list as well. I'd use the List object for that.

    Are your items numbered sequentially? If they are it makes things a whole lot easier - set up a List object (I'll call it "Pictures") that is filled with as many items as there are entries in the picture list at the start of the level. Then, once you know the "correct" image, delete its entry from the list (using the "Select a line" action and then Delete Current Line).

    The remaining images in the list are going to be the "wrong" images, and you want to repeatedly pick four of them out of the list and display them in turn in the other image slots. Selecting a random line from a list object can be done with "Select Line(random(Number of lines in List object))", or something approaching that syntax. Have four of those events, loading the image from the entry and deleting the selected line each time.

    After an image has been picked, you'll need to repopulate the list with all the values before prompting the user again.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to best solve a random question

    Thanks DavidN that sounds like a clean and simple solution. I'll try it. [smile]

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to best solve a random question

    Can one load an item list from an INI-file into the list object?

    -- edit ---------
    Never mind, I think I found it. [smile]


    ------ edit again ----
    Works perfect! Thank you again DavidN! [grin]

Similar Threads

  1. One more random question
    By Captain_Harris in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st October 2012, 07:03 AM
  2. how solve this?
    By mnovoa in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st August 2012, 12:21 PM
  3. Random question
    By Redsquirrel in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th July 2012, 08:19 PM
  4. Cant solve this
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 2nd March 2012, 05:32 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
  •