Page 1 of 1

Using Global Code

PostPosted: Thu Sep 07, 2006 7:21 pm
by irblinx
I'm probably missing something obvious but how do I call global code from within an actors script?

I assumed that global code worked like C functions and that I should be able to call it using something like:

solutionCheck();

Am I on the right track but missing something or do I have to create a new function in the global code and call that?

PostPosted: Thu Sep 07, 2006 8:25 pm
by makslane
Use the global code editor to define the function:

Code: Select all
void solutionCheck()
{
  //Your code
}


And call the function from any Script Editor action:

Code: Select all
solutionCheck();

PostPosted: Thu Sep 07, 2006 10:09 pm
by irblinx
Ok, just out of interest then, what are the names of the global code functions used for? Why don't we just have one global code area?

PostPosted: Fri Sep 08, 2006 4:24 am
by makslane
Just for a better organization of the code, but you can use a single global code, if you want.

PostPosted: Fri Sep 08, 2006 8:14 am
by irblinx
Cheers Mak, confusion over, I just use normal C functions and can call them from the Actors script, sweet :)