User Tag List

Results 1 to 5 of 5

Thread: Copying randomly selected pictures

  1. #1
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Feb 2010
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copying randomly selected pictures

    Hi

    I have a 10 by 10 tile area and I populate the tiles with pictures that are randomly selected from an area outside of the play area.

    I'm making a matching game so I need a copy of that randomly generated picture to also be placed in another randomly selected place holder within the same grid so the user can find the matches, but I'm having trouble getting there.

    Any help would be greatly appreciated.

    Thanks,
    Adrian




  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copying randomly selected pictures

    The way I would go about doing it is to create a number array 10 x 10 in size. By default this array will be filled with 0's when created. You fill each cell of the array with a number, which will correspond to a certain tile.
    1 could equal a fire tile, 2 could equal the dragon tile, etc.
    Then start a loop to go through the array and fill each cell with a random tile.
    There are many ways you can keep track of which tiles have been placed. A simple way would be to have a list object store all your tile numbers twice to begin with. Then start a loop 100 times and each time pick a random number out of the list and add it to your array. Make sure you delete the number from the list!

    There are plenty of other ways too, this should just give you an idea to get you started!

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Location
    South Africa
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copying randomly selected pictures

    The Random Pool object could be used too. Fill it with the numbers 0-99. Then for each picture, set an alterable value to a random number from the pool divided by 2 (integer division). After that you can load each picture according to its alterable value (0.png-49.png). Or set its frame index to its alterable value.

  4. #4
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copying randomly selected pictures

    Yup, you could do it like that too. As I mentioned there are many ways to do it.
    P.S Hows Dringletopia Ai project going?

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Location
    South Africa
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copying randomly selected pictures

    bigredron: Very little progress, since the last release.

Similar Threads

  1. converting pictures to active pictures
    By andrew36 in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 11th September 2013, 04:55 PM
  2. slow copying
    By FormerTGFGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 17th May 2013, 01:40 PM
  3. Copying files
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th August 2008, 06:52 PM
  4. copying frames.
    By bunnyonion in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 11th July 2008, 08:48 PM
  5. Copying a directory?
    By DeepGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 27th September 2006, 12:52 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
  •