playMaker

Author Topic: Arraymaker / Random position exclusion [SOLVED]  (Read 1815 times)

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Arraymaker / Random position exclusion [SOLVED]
« on: August 30, 2014, 02:24:53 PM »
Hello,

I need to place different blocks in 9 different random positions, using arraymaker, it is working except one issue i cannot resolve, sometimes the blocks are spawned on the same position and i would end up with a few of them overlapping, I cannot use the "Add 1" to int technique because it needs to be random. I basically need to exclude the Index int from being picked more than once during this spawn set.

Any advice on how to get this working would be much appreciated, thank you
« Last Edit: September 03, 2014, 05:45:51 AM by Phuzz »
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: arraymaker / random position exclusion [Solved]
« Reply #1 on: August 30, 2014, 04:03:42 PM »
OK got it sorted out, been working on it for 3 days but as soon as I stated this topic i figured it out  :) Magical

I just used Shuffle Array-list items then start at Index 0 and add 1 to Int at every spawn.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

LogLady

  • Full Member
  • ***
  • Posts: 150
Re: arraymaker / random position exclusion
« Reply #2 on: August 30, 2014, 08:07:28 PM »
Thanks for posting how you solved it.