Page 1 of 1

Node ID

Posted: 06 Dec 2012, 19:04
by in_ty
Hi,

Is it possible to get smth like node ID? I'd like to call a script method by several nodes and I want to know, which node is calling.

Sorry for my English, it's not native for me.

Re: Node ID

Posted: 07 Dec 2012, 10:07
by TobiTobsen
Hi,
a good working flow would be to use a hierarchy container, make it an interface and put a container info node in your hierarchy container.

I think if you search the help for the container info node, you should be able to figure out how it works...

Good luck!

Cheers,
Tobi

Re: Node ID

Posted: 07 Dec 2012, 12:26
by Christian Krix Schmidt
You can also use an event node between each of your nodes and the script. Use a different argument (the ID) for each event node. The argument gets passed to your custom C# function. You can access it with the arg variable inside the script. Combine that with Container system Tobi described by connecting the event node argument to the Container Info node and you can quickly duplicate and use any number of elements to trigger a method with your script and know which one it was.

Re: Node ID

Posted: 07 Dec 2012, 13:05
by in_ty
Thank you very much!!!

Re: Node ID

Posted: 07 Dec 2012, 13:21
by in_ty
I tryed to take smth from args, but its int and always 0.