So my code is as follows and im wondering how to use the variable " other" in a different method?
for examle
example()
{
target = other.transform
}
void OnTriggerStay(Collider other)
{
if (Input.GetMouseButtonDown(0) && GetComponent<Battler>().attacktimer.fillAmount == 1)
{
hitsound.Play();
Cmdhitgraphic();
other.GetComponent<Battler>().takedamage(attackDamage);
other.GetComponent<EnemyControl>().takedamage(attackDamage);
}
}