Can anyone tell me, how to call a function from another script. I have 2 objects. First the enemy, second am empty gameobject as “gamecontroler”.
When the enemy touch my player, my enemy should call the Game_over() function which is attached in a seperate script at the gamecontroler object.
I know I can insert the Game_over() function into the enemy script, but thats not what I want. How to call variables form another script is no problem for me, but how to do this with a function, I have no idea.
“gamecontroler” is a reference to a GameObject in Maglat’s game that has a “myScript” attached to it. You would reference some GameObject that’s in your game, Jfhutchi.