Random Scenes after dead

Updated 7 days ago in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
3 on January 13, 2018

Hi,

It’s possible add random scenes with hmm maybe “tag” after death? Or add random screen (quiz) after deadth, when You answer correctly – you play still, but when You answer bad – game over.

 

 

  • Liked by
Reply
0 on January 13, 2018

Yes, I don’t see why that wouldn’t be possible…?

 

  • Liked by
Reply
Cancel
0 on January 14, 2018

Hmm, thanks, and what i’m doing?

I have this:

 

    public void EndGame()
    {
        audioManager.PlaySound(gameOverSoundName);
        Debug.Log(“GAME OVER”);
       gameOverUI.SetActive(true);
    }

 

 

And in “GameOverUI” a I have question and button with answer, if You answer correctly reload scenes, but other answer – game uver UI. But it’s on question – what i’m doing that this UI was random with maybe special tag?

  • Liked by
Reply
Cancel
0 7 days ago

Ok i find resolution:

 

       int index = Random.Range(x, y);
        SceneManager.LoadScene(index);

 

  • Liked by
Reply
Cancel