Transfer array vars then have that var deleted?

0 favourites
  • 6 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • I have a starting array, a list of character names, so they are text, not numbers.

    I want to randomly choose a character name from this first array, then add that name to a new array.

    I want to be able to do this many times throughout the game, without randomly choosing the same name twice.

    Essentially, I want to randomly choose a name, add that name to a new list, and permanently delete it from the first array so it can never be picked again.

    I've been reading array tutorials all day, and I haven't gotten a clear, clean way to do this.

  • 116 views and no one knows the answer?

    Maybe my question isn't clear?

    I want to have a pre-built array of character names.

    I want to randomly choose a name from that array.

    I then want to move that name to another, empty/new array.

    I then want the name that was chosen to be permanently deleted from the original array so it can never be picked again.

  • Hope it helps


    edit: slight mod


  • I will check these out right away.

    Thank you!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Says I can't open these.

    Your version is 187, mine is 184.

    I only see 184 as the current updated version (I even re-installed to be sure).

  • oh it's the 187 beta version


    the relevant stuff is in event 5

    the arrays are set to 0 width in the properties

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)