0 votes

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

Thank you very much.

in Engine by (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)
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

by (114 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.