I am really thinking on a jass function like
GetTriggerPlayer
which makes an instance for a trigger which will not be cleared up until the trigger not finishes. You know maybe how do this function work. So my question is how to make sthing like these but with other types and is it possible?