I have already made my function, and called it within the same script file i placed it in , and test it out it works fine.
now i would like to save my function on a separate script file, and then call it from any script file i would like in the game.
First, in order to do that I would like to know what type of script Extends i need to give the file, Example: Scriptname GP_myfunctionScript extends (???) . Shall i give it Actor, Objectreference, Script or what ?
Second, how do I call it from another script file ?
here is an example of the file i want to call it from using an Event OnDeath
Spoiler
Scriptname gp_aaa extends ActorActor Property PlayerRef Auto Auto State AutoStateEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If akAggressor == PlayerRef Debug.Notification("Level " + GetLevel()) EndIf GoToState("")EndEventEndStateEVENT OnDeath(Actor akKiller) if (akKiller == Game.GetPlayer()) ;Call My Function in here. EndIfEndEvent