From 039f77e535da307e020d7ba5dfd8c7c8c8b1cc32 Mon Sep 17 00:00:00 2001 From: Robin Ruud Kristensen <robin1998@hotmail.no> Date: Thu, 10 Nov 2022 23:38:20 +0100 Subject: [PATCH] fixed wrong else if statement --- MrBigsock/Assets/Code/InteractionSystem/Door.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MrBigsock/Assets/Code/InteractionSystem/Door.cs b/MrBigsock/Assets/Code/InteractionSystem/Door.cs index d90a8a7f..7ce964c2 100644 --- a/MrBigsock/Assets/Code/InteractionSystem/Door.cs +++ b/MrBigsock/Assets/Code/InteractionSystem/Door.cs @@ -19,7 +19,7 @@ namespace BigSock.Interact { public bool Interact(Interactor interactor) { if(i > 0)enemies = GameObject.FindGameObjectsWithTag((i - 1).ToString()); - else if (i > 0) enemies = GameObject.FindGameObjectsWithTag((0).ToString()); + else if (i == 0) enemies = GameObject.FindGameObjectsWithTag((i).ToString()); if (enemies.Length == 0) { Debug.Log("Opening door!"); -- GitLab