If you're just trying to call a custom function from within another function (such as _on_Area2D_body_entered()
, there's not much to it... Here's an example:
func _on_Area2D_body_entered(body):
custom_function() # call the custom function
func custom_function():
pass # do stuff here...
If you want/need to pass data into the custom function, just add function args as necessary.