It doesn't make sense to put a trigger in a function. Triggers only run when some outside event happens, like a mouse click. Functions only run when you use a 'call function' action. There is no overlap between these. Since it's invalid, the editor disallows it.
I think you need to just rearrange the events so you call the function in the triggered event.
Perhaps you are confusing functions with libraries - they're two different cases. A function is a single re-usable piece of logic, and a library is a collection of functions and other pieces of logic. Right now Construct doesn't have a good equivalent for libraries, but functions work analogously to how they do in programming languages.