How to create this node (I have the picture of it but I don't know how to create it ! )

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By samy

How to create this node : CallInstance: Node.Is_in_group() ?

Thank you very much.

I don’t think I understand the question.

SIsilicon | 2018-09-19 20:11

Are you referring to the entire visual script configuration (i.e. how the nodes and function calls are linked up)? Or do you just want to create a CallInstance node and attach the function Node.is_in_group()?

Ertain | 2018-09-19 21:11

I found it , I am using 3.1 for a long time ,when I see this node I can’t recreate it (because the Image is from 3.0.x).
I mean what are the steps to create this node (node.is_in_group)?
those steps to create similar node:
drag and drop “Call node” >> change call mode to Instance >> change base type to Node2D >> change function to is_in_group
but the nodes does not looks the same : (its just because version3.1 and 3.0.x)
node_is_in_group.png - Google Drive
Thank you very much SIsilicon and Ertain for reply.

samy | 2018-09-20 02:19

:bust_in_silhouette: Reply From: vic.the.developer

I know this answer is a long time coming but for anyone that runs into this later in Godot 3.1, hopefully this will help.

You have to do a typecast on the body parameter to Node (is node?) and then on yes you can do Node.is_in_group() which let’s you specify the group name and will bass on the true/false result to a condition, which you can then act upon accordingly.

Here’s what that looks like:
enter image description here