![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | lalel345 |
what are the methods in godot, I have seen that they mention it in the official documentation without explaining what
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | lalel345 |
what are the methods in godot, I have seen that they mention it in the official documentation without explaining what
![]() |
Reply From: | Ertain |
Methods are the names of the computer code functions in the classes of the Godot engine. The term comes from object-oriented programming (OOP). OOP is a major part of how the Godot engine functions.
![]() |
Reply From: | kidscancode |
In programming, a function is a block of reusable code.
In object-oriented programming, a “method” is a function that’s defined in a class.
In practice, “method” and “function” are used fairly interchangeably.
so if i want to use has_method then all i need to do is
If (node_hit.has_method(“some method in the target node script”) == true:
and that method could be something like
func on_firefly_dig.
So i guess my question is if i put in “on_firefly_dig” would the has_method work?
ForgottenStar | 2021-06-30 03:14
This reply is amazing! I have been banging my head against a wall for the past week trying to figure this out, but none of any of the tutorial I watched explained this. This makes things so much clearer now!