Currently I’m away from my PC, but here’s how you do some checks (all of which you can use in body_entered). All of these are entirely based on my memory, so they may need some tweaking to work.
Check if node is of base node type:
if node is BaseNode:
“Example”
if body is KinematicBody:
Check if node has variable:
(If the variable has a value of null, this will return false, even though the variable is defined)
if node.has(“variable name here”):
“Another way, not 100% sure it works though”
if “variable name here” in node:
“Example”
if body.has(“velocity”):
Check if node has function
if node.has_method(“function name here”):
“Example”
if body.has_method(“Apply_Impulse”):
Check if node is in group
if node.is_in_group(“group name here”):
“Example”
if node.is_in_group(“enemies”):
Those are the ways I can think of right off. Most of these are functions in node. I do not know of any way to check whether a node has a certain script, but there might be a way and I’m just unaware of it. I’ve always just added a constant variable with a name like TYPE and then used has to see if it has a type, and then processed accordingly.