How do I Copy a random value from a column and add it

0 favourites
  • 4 posts
From the Asset Store
Customize the animation of character when item changed
  • I am making a game which uses a lot of attributes for different people.

    I have set up the arrays I am just trying to randomize values and random generate names. I have made an array consisting of 100 first names and 100 last names but having problems of copying a random name from the first array to another array.

    Any help would be great not really used arrays much and am struggling with trying to get the randomization I want.

    Thanks

  • First off, have you read Arrays for Beginners? (https://www.scirra.com/tutorials/307/ar ... -beginners). It has everything you need to know to create, populate, and retrieve values from arrays.

    Second I don't follow the question as you say you're trying to copy a random name from the first array to another array. You can use the firstnames.At() to get the first name value and copy anywhere you want (even using the Random() function to get the value).

    If you can post a screenshot or a better description of what you're trying to do that might help more to answer the question (if you don't find the answer on the Arrays for Beginners tutorial page).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well basically I wanted to make a random name generator with a first and last name. I thought I could do it with an array and just got it to choose a random name of the list but it's not worked how if thought it would.

  • Quick example. Ignore start of layout stuff that is just a quick way for me to populate the array with names.

    [attachment=0:1ygme43h][/attachment:1ygme43h]

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