How to rename a node in script [Solved]

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

hey I was wondering if there was anyway to rename a node while the game is running through scripting. In my game I currently have each turret on a ship belonging to a spatial node named group_1, group_2, group_3, etc… The problem comes when I load the game. Because the groups are independent of the ship scene that i instance, they don’t come in with it. Thus I need to be able to rename nodes for the sake of simplicity and scalability. Any help is appreciated

:bust_in_silhouette: Reply From: Viribus

Figured out that nodes have a .name member variable