From 943c6bd49c943f1579821e32b7b211c4dd8f90fc Mon Sep 17 00:00:00 2001 From: Techwizz Date: Thu, 11 May 2023 09:46:11 -0600 Subject: [PATCH] Gun now goes invisible wheen you toggle HUD --- scripts/console.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/console.gd b/scripts/console.gd index 0346d93..50cf28c 100644 --- a/scripts/console.gd +++ b/scripts/console.gd @@ -54,6 +54,16 @@ func run_command(command): HUD.visible = false elif HUD.visible == false: HUD.visible = true + toggle_gun() else: Global.consoleOutput = "Unknown cheat code" $output.text = Global.consoleOutput + +func toggle_gun(): + var map = Global.currentMapNode.get_path() + var playerID = Global.teddyAuthorityID + var gun = get_node(str(map) + '/' + str(playerID) + '/CollisionShape3D/Neck/Camera3D/Gun') + if gun.visible == true: + gun.visible = false + elif gun.visible == false: + gun.visible = true