The engine displays the action name by checking all currently running actions and finding in which one "me" is the entity pointer. This is not necessarily the original entity action. You can make any function to an action by setting the "me" pointer.

But I'll implement the engine_getfunctionname function. The reverse function is already there.