Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

spawn a coin randmomly when coin is collected?

A topic by NINSYNK created Aug 21, 2022 Views: 113 Replies: 3
Viewing posts 1 to 4

pleas help me... if you can

Submitted

You can have the coin instantiate another coin in a random range of positions on contact with your player

Submitted

+1 to @frizuo’s approach. You could place several empty gameobjects/nodes as “spawn points” and randomly pick one for the new coin’s position.

Submitted

you could do this if you want

Vector2 newCoinPosition = new Vector2(Mathf.Random(-100,100),Mathf.Random(-100,100));

Instantiate(Coin, newCoinPosition, Quaternion.Identity);


hope it helps!