I’m trying for some time now to create a simple script but my brain is not working as it seems. So let’s say i have 3 cubes and 3 empty game objects. Each time i start i want it to give each cube a number from 1 to 3 randomly and then do the same for the empty game objects. So i assume using 2 randomizers is good. Next i want it to move the 3 cubes on the empty game objects position depending on the number each cube has with each empty game object. Here is a script that may help you understand better what I’m trying to achieve.
#pragma strict
function Start ()
{
// Select a number from 0 to 3 and give a number to each cube.
// Select a number from 0 to 3 and give a number to each empty game object.
// Also after a number is given to a cube or an empty game object i want it to remove that number to avoid giving the same number.
}
function Update ()
{
// The cube with id = 1 go to empty game object id = 2
// The cube with id = 3 go to empty game object id = 1
// The cube with id = 2 go to empty game object id = 3
}