Hello Good evening ,
im working on a project which containes a player who throws a bomb with 2 differents scripts so here is my example :
the problem Is the boolean Isdropped turn always true & wont turn false again
Script A
public class Bombscript : MonoBehaviour
{
public BOMBDROPPOINT other;
void Start()
{
}
void Update()
{
if (Input.GetButtonDown("Fire1"))
{
Explode();
other.Isdropped = false;
}
}
public void Explode()
and the Script B who contains the droppoint (Player)
public class BOMBDROPPOINT : MonoBehaviour
{
public bool Isdropped = false ;
public Bombscript other;
private void Start()
{
}
void Update()
{
if (Input.GetButtonDown("Fire1") && Isdropped == false)
{
Drop();
Isdropped = true;
}
}
PS : i did it on purpose when binding Fire 1 for 2 actions (thats my goal)
thanks