I have another script attached to a trigger object. When the player enters the trigger, the trigger script tells the script below that canPickUp is true. It doesn’t tell the script pickUpPaper is true. Hopefully someone can help. I’m sure I’m just not thinking right! Brb, gotta take my pills lol
function Update ()
{
if (canPickUpPaper)
{
if (Input.GetKeyDown(KeyCode.E))
{
if (pickupTimer == 0.5)
{
if (!dropPaper)
{
pickUpPaper = true;
Debug.Log("Picking up paper " + dropPaper);
countDown = true;
}
if (dropPaper)
{
pickUpPaper = true;
dropPaper = false;
Debug.Log("Dropping " + dropPaper);
countDown = true;
}
if (pickUpPaper)
{
dropPaper = true;
Debug.Log("Picking paper back up " + pickUpPaper);
countDown = true;
}
}
}
}
if (pickupTimer <= 0.0)
{
countDown = false;
pickupTimer = 0.5;
}
}