need help for scripting of a custom function. although it worked last time now i get "undefined"-messages in the maxscript listener.
the little script is attached. in this script i first try to define a custum function for initilizing of a custom coordinate systeme / the elements of a custom transformation matrix.
then i try to call this function. in the end i try to assign the called parameters to variables for later calculations. all i need for calculation is the assignment of an scene object called "start.dreieck" - this is the first parameter. all other parameters callculated in the function body i want to read out.
i don't know if it is in generall possible to use parameters of a function for both directions: sending and reading. but like i earlier said - last time, with many stuff in memory after a long scripting session, it worked. what do i have to change for working after closing an restarting max?
fn koordSysInit thename nullpunkt y_achse z_achse x_achse =
dreieck = thename
nullpunkt = polyop.getFaceCenter dreieck 1
y_achse = normalize(polyop.getVert dreieck 1 - nullpunkt)
z_achse = polyop.getFaceNormal dreieck 1
x_achse = cross y_achse z_achse
koordSysInit $'start.dreieck' start_nullpunkt start_y_achse start_z_achse start_x_achse
thenullpunkt = start_nullpunkt
the_start_y_achse = start_y_achse
the_start_z_achse = start_z_achse
the_start_x_achse = start_x_achse