Issue with passing value from separate script into animation event function

Hi, I dont know if I worded the title properly, but I am having trouble finding documentation on how to pass a value from a separate script into an animation event function.

I see from the documentation that you can set an int parameter in the Start function to pass into the event function, but I dont see how to do this with a value from a separate script that is referenced.

I.E.

animEvent.intParameter = otherScript.intValue;

something along those lines, where otherScript is declared and referenced.

P.S. please feel free to critique my misuse of terminology or explanation. Its all about learning!

P.P.S. If there are anything comprehensive guides on this subject or there is a better way to do this, id enjoy reading that.

I found the solution:

1st. Make a reference to the GameOjbect in the script.

2nd. Create the event function (since I was passing an int, set the parameter value to int, with the value name)

3rd. Call the function through the unity event system, no need to set the intparameter in the event window to anything.

It looks something like this in the code.

public PlayerStats pStats;

//Anim event function

public void Strike(int damage)
{
    Target.GetComponent<GetDamaged>().GetHit(pStats.damage);
    Debug.Log("Strike");
}

P.S. Honestly don’t know why the debug is not being called tho.