Can I detect a node when I click?

I have multiple different nodes, and I want to know what node I am clicking. Is this possible? thanks.

gui.pick_node()

Yeah,I know but that function need a node as parameter, you get a node by his id, but, what if you dont know the id?

There is no situation where it’s impossible to know the nodes you have in your scene or are creating.

How are you creating your nodes? If you are doing it by cloning nodes then the return value is the node’s reference.

Then if I have 20 nodes, how can I know Who im picking? Comparing to all ids in the scene?

Yes, you have to manually check each one you want to be able to check on input.

Ok Ill try thanks. There is something like script properties but for nodes? Im using nodes for represent cards, need to give some properties to the cards

Unfortunately not, you’ll need to setup data for each node up in your scripts.

1 Like

Ok thanks :slight_smile:

2 Likes