Hi all,
I am in a kaffuffle...
I want to spawn random numbers say between 1-99 to display on the screen in predefined positions. So:
The code spawns either of the two prefabs on predefined positions using emptys.
So how do i convert this to spawn random numbers ranging from 1-99... When the numbers are clicked it will add up and match the sum of 42?
I am in a kaffuffle...
I want to spawn random numbers say between 1-99 to display on the screen in predefined positions. So:
The code spawns either of the two prefabs on predefined positions using emptys.
Code:
[SerializeField] GameObject PrefabA;
[SerializeField] GameObject PrefabB;
[SerializeField] Transform[] spawnPoints = new Transform[8];
for (int i = 0; i < spawnPoints.Length; i++) {
Instantiate((Random.Range(0,2) == 0 ? PrefabA : PrefabB), spawnPoints[i].position, Quaternion.identity);
So how do i convert this to spawn random numbers ranging from 1-99... When the numbers are clicked it will add up and match the sum of 42?