The questions I found when making a specific game like puyo puyo, or columns, did not match the problem that I have. Now this is just something that I want to make from the ground up, and make a puzzle game that has the columns puzzle piece mechanic, but plays in a small grid and plays like puyo puyo. But right now I’m having trouble making the spawner, the component that places the pieces on the board. I have only two errors in the spawner script. Here’s what I have so far:
public void SpawnNewGroup() {
int i = Random.Range(0, Groups.Length);
Instantiate(Groups_, Transform.position, Quaternion.identity);_
}
The parts in bold are the errors I have according to the Visual. How can I fix this without making it worse, or starting back at square one?
swanne
2
Hey,
I did a similar thing with spawning waves of enemies in a spaceshooter game. The concept sounds similar. I used a coroutine to control the timing bewteen spawns too. Check out the below and hope it can help a bit;
IEnumerator SpawnWaves()
{
yield return new WaitForSeconds(startWait);
while (true)
{
for (int i = 0; i < Groups.Length; i++)
{
Vector3 spawnPosition = new Vector3(Random.Range(-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
Quaternion spawnRotation = Quaternion.identity;
Instantiate(puzzlePiece, spawnPosition, spawnRotation);
yield return new WaitForSeconds(spawnWait);
}
yield return new WaitForSeconds(waveWait);
}
}