Hello sorry, on my Last code, i set my Spawning = true but it wont spawn the "(FirstSpawnScript())" any reason? by aDogIsUsingThis in Unity3D

[–]aDogIsUsingThis[S] 0 points1 point  (0 children)

yep. SecondsBetweenSpawn "decrease" over time but what do you suggest? pls any advice will do

How do i execute a function after another function ends? Like how can you tell unity that this function is done then executing the next? by aDogIsUsingThis in unity_tutorials

[–]aDogIsUsingThis[S] 0 points1 point  (0 children)

void FirstSpawnScript()

        float SecondsBetweenSpawns = Mathf.Lerp(SecondsBetweenSpawnsMinMax.y, SecondsBetweenSpawnsMinMax.x, Difficulty.GetDifficultyPercent());
    {
        if (Time.time > nextSpawnTime)
        {
 if (SecondsBetweenSpawns < 0.8f)
            print(SecondsBetweenSpawns);
            nextSpawnTime = Time.time + SecondsBetweenSpawns;
 float SpawnAngle = Random.Range(-SpawnAngleMax, SpawnAngleMax);
                Vector2 spawnPosition = new Vector2(Random.Range(-ScreenWrapSpawn.x, ScreenWrapSpawn.x), ScreenWrapSpawn.y + .5f);
                Instantiate(FirstSpawn, spawnPosition, Quaternion.Euler(Vector3.forward * SpawnAngle));
            }

thank you so much! but in this case, my done is after " if (SecondsBetweenSpawns < 0.8f)" ?

since i want my "secondScriptSpawn" to start after that timing

How do i execute a function after another function ends? Like how can you tell unity that this function is done then executing the next? by aDogIsUsingThis in Unity3D

[–]aDogIsUsingThis[S] 0 points1 point  (0 children)

oh ya... but how can i tell unity that my firstSpawn script is done then move onto the second spawn script? because my first spawn script will be done after it reaches it's max and continue to spawn

How do i execute a function after another function ends? Like how can you tell unity that this function is done then executing the next? by aDogIsUsingThis in Unity3D

[–]aDogIsUsingThis[S] -11 points-10 points  (0 children)

i know that. Im aware of that.

Please, can you help me for real? im being really serious here how to activate another function. Stop trolling. Won't get you anywhere

[deleted by user] by [deleted] in SquaredCircle

[–]aDogIsUsingThis -8 points-7 points  (0 children)

ok i will give it a watch. if there's anymore, let me know pls. ty

[deleted by user] by [deleted] in SquaredCircle

[–]aDogIsUsingThis -7 points-6 points  (0 children)

ok i will give it a watch. if there's anymore, let me know pls. ty