playMaker

Author Topic: Can I do this using ArrayMaker?[SOLVED]  (Read 1373 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Can I do this using ArrayMaker?[SOLVED]
« on: March 13, 2014, 11:14:17 AM »
Hi,
If I have say, 40 empty gameobjects, each set at different positions. And say, 4 Arrays that will hold 10 of the empty gameobjects.  Can I then, randomly populate the 4 Arrays with 20 cube objects.  So I end up with something like this:-

Array1 = 5 cubes
Array2 = 2 cubes
Array3 = 10 cubes
Array4 = 3 cubes

If ArrayMaker can randomly populate multiple Arrays, how would I start on doing this?  I'm thinking maybe, create a master Array with the 20 cubes, create a temp array in each Array to hold the empty gameobject positions.   Then somehow randomly populate each temp Array with the cube Array.
Can someone give me some advice?
« Last Edit: March 18, 2014, 09:08:53 AM by jeanfabre »

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Can I do this using ArrayMaker?
« Reply #1 on: March 13, 2014, 02:59:43 PM »
Ok, I have it working, its randomly positioning the cubes, except not all of the 20 are getting positioned.  Its weird, sometimes 14, sometimes 15.  Any thoughts why this is?

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Can I do this using ArrayMaker?
« Reply #2 on: March 14, 2014, 03:09:34 PM »
I've fixed it now, it was just simply positioning some objects at the same position more than once. Phew!