#X Y G O N loop discussion

1 messages · Page 1 of 1 (latest)

lyric willow
#

@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

pearl patio
#

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

lyric willow
#

what are you using the random numbers for?

pearl patio
#

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

lyric willow
#

jsut do the random each time you need it

pearl patio
#

This is still just creating one random number when the Start() function is called and using that to set the time

lyric willow
#

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
pearl patio
lyric willow
#

nice art, i like the parallaxing. sorry I couldnt help more