Script - get linked node

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

Hi,

I need to check if the node linked to my script is equals to a global variable

but how do I get the node linked to my script ?

thanks

:bust_in_silhouette: Reply From: timothybrentwood

http://kidscancode.org/godot_recipes/basics/getting_nodes/

:bust_in_silhouette: Reply From: phil1234

actually it’s just about using self

if(Global.currentPlayer==self):

global being a singleton and currentPlayer assigned on startup to a root particular node