Mini games in Game

Hi!
Need to make a mini game in game,so that list what i should to do, just only want to check that i right before i start:

  1. disable game input keys
  2. move mini game to camera, make it parent and visible
  3. start mini game, start listener for variable FINISH=true
  4. if mini game complete successfully set FINISH==true,remove game preset…

Thanks )

what do you mean with Mini-game in game

hmm… it when you interacting with object in game… for example to unlock door,hack computer… mini-games start… if complete successfully – then door unlocked, computer hacked…

I would go by disabling the main player script. Then activating another script that works for said minigame. Have the minigame have it’s own camera and/or scene and load that camera/scene. Use a boolean to specify if you beat the game or if you’re done with it. Then switch back to the other settings. :slight_smile:

if it is not hard for you… How it will be on C# to disable main player script,change main camera and activate another controll script? Thanks ))

Something like

GetComponent<PlayerScript>().enabled = false;

Will enable/disable a script.

Just google the other parts as the docs and answers gives many examples.

Thanks that just what i need ))))) But with one problem - got error:
NullReferenceException: Object reference not set to an instance of an object