I don’t know how to put this and it’s the middle of the night here and i’m tired lol
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LeverMove : MonoBehaviour
{
public Animator LeverAnim;
public DoorScript door;
public GameObject[] Players;
void Update()
{
Players = GameObject.FindGameObjectsWithTag("Player");
}
private void OnTriggerStay2D(Collider2D collision)
{
if (Players[0 & 1] && Input.GetKey(KeyCode.Q))
{
LeverAnim.SetTrigger("LeverMoves");
door.DoorOpen();
}
else
{
return;
}
}
}
so this is my code and what I wanna achieve is I want the players to all be (or only 2 of them)
be at a single trigger at the same time and whilst that’s happening the player should be able to press a key for the command to execute, anyone know how I can achieve this, Thanks!