User Tag List

Results 1 to 1 of 1

Thread: Shuffle an Array (Dynamic Array)

  1. #1
    Clicker Fusion 2.5 (Steam)
    bad_rick's Avatar
    Join Date
    Jul 2014
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Shuffle an Array (Dynamic Array)

    Here is a simple example to shuffle items in an array (using the Dynamic Array Object).

    The idea is to have an array with different numbers (for example 0-9) and you like to shuffle these numbers and store it in an other array (the result could look like this for example: 8465739201).
    Every number has to be unique in the new array. (that's the point)

    It's useful if you like to create random maps or creating a card game and like to shuffle the cards.

    I didn't found anything like this in the forum so I started to create it for myself
    It's maybe not the best way to create this (and there is surely an easier way), but it works

    Hope you can use it for your games or apps

    ps.
    there are some counters for debugging in the apps - don't be confused.
    The important line is the last one (it appears in a yellow-like color)

    shuffled.png
    Attached files Attached files

Similar Threads

  1. Array dynamic?
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 12th December 2013, 05:22 PM
  2. Dynamic Array - Sort 2 dimension array by Column 1
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th December 2012, 04:54 AM
  3. Is it best to use a dynamic array?
    By TheSynapse in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd February 2012, 08:54 PM
  4. Dynamic Array to Binary Array problems
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd March 2010, 10:48 PM
  5. Dynamic Array difficulties.
    By Meanderer in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th May 2008, 12:03 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
  •