#X Y G O N loop discussion
1 messages · Page 1 of 1 (latest)
@pearl patio if you want I can explain exactly what the code in a basic loop is doing but all you need to know is how many random numbers you want
At the moment the prototype I'm working on doesn't technically have an end state, although eventually, once it does, the random numbers would need to generate until the level is completed
what are you using the random numbers for?
Okay so I have a side scroller, a little ship dodging obstacles. The obstacles are instantiated at random positions and random times
Random positions got working fine, but want to also have the spawn times randomised
jsut do the random each time you need it
This is still just creating one random number when the Start() function is called and using that to set the time
Your gonna need to write your own timer instead of using invoke
if (t <= maxTime)
{
t += Time.deltaTime;
}
else
{
//call function
T = 0;
}
``` something like this
I'll have to look into that tomorrow
nice art, i like the parallaxing. sorry I couldnt help more