Get Group of Self

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

How would I get a node’s group in code? I was trying self.get_group() but that didn’t seem to work. I hope you understand what I am asking, it would be amazing if you could help, thanks.

Depending on what you need the function for, is_in_group might work instead.

exuin | 2021-01-25 21:34

:bust_in_silhouette: Reply From: DDoop

get_groups() gives you an array of all the groups a Node is in, since Nodes can be in multiple groups.