Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Splankton on March 13, 2014, 11:14:17 AM

Title: Can I do this using ArrayMaker?[SOLVED]
Post by: Splankton 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?
Title: Re: Can I do this using ArrayMaker?
Post by: Splankton 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?
Title: Re: Can I do this using ArrayMaker?
Post by: Splankton 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!