Passing control from one place to another

Hello. Thanks in advance for your ideas.

I would like to start a program with a script attached to a button and have control pass to a main script.

Our button is located in the hierarchy at ROOT > Interface > Plane > Plane-pointerdown

We want the last command of this script to transfer to a new context in
ROOT > Code > Mainscript
so we have typed in symbol.nodes.Mainscript ();

This does not seem to work.

Can someone tell me why this is not working?

If I understand you right. Your looking at sending code from one script to another. If so you need to use the export command for what your working with.

Steve

I agree with Steve. Could be easier also to put all your scripts at the same place, and just make a call to the function from your button. Cheers.

1 Like