L
L
LeiksGames2021-07-27 22:41:18
C++ / C#
LeiksGames, 2021-07-27 22:41:18

How to write a script so that an object in unity3d spawns in a random place, and a new object appears after 1-3 seconds?

I have a game, like pac-man (pac-man), but in pac-man, the points are constantly at one point. And I need 1 point to appear in a random coordinate, and another point appears after 1-3 seconds (time is also random).

Minimum coordinate (-11.99, 1.5, -11.99)
Maximum coordinate (11.99, 1.5, 11.99)

Thanks in advance, I thought it would be easy to write the code, but for a 15 year old it turned out to be hard XD

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
ReyGrau, 2021-07-28
@ReyGrau

random spawn position
Spawn after every 5 seconds

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question