How can I access a function from one script to another one?
I have 2 scripts: trigger.cs player.cs
In the trigger when player enters, I need it to call a Jump() function
if I do it like this
player p = GameObject.Find("Player").GetComponent(player)();
I can access variables but not functions. Using static function is a no go too because not only does it cause many problems, it will also not work if there's more than one player.
So how do I force a player to jump when he enters a trigger?
Also it MUST be executed from trigger.cs file.
.cs is just an example, a js will do too.