0 votes

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

Node.Is_In_Group
Thank you very much.

asked Sep 19, 2018 in Engine by samy (21 points)

I don't think I understand the question.

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()?

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.isingroup)?
those steps to create similar node:
drag and drop "Call node" >> change call mode to Instance >> change base type to Node2D >> change function to isingroup
but the nodes does not looks the same : (its just because version3.1 and 3.0.x)
https://drive.google.com/open?id=1pm5Uu6Y9W7E_8IjHpzD6CJsTwdxWlEbz
Thank you very much SIsilicon and Ertain for reply.

1 Answer

0 votes

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.isingroup() 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

answered Jun 5, 2019 by vic.the.developer (112 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.