"Generalities about Gen Script"
Merely all editor operations can be simulated
by "GenScripts".
"Genscripts" can be read with MainMenu->Scripting->Edit
or with TAB COMMAND ONELINER (F8)
Example:
# generate brokens
GenScriptClean();
# select added "KUB"
GenScriptAdd("SETSEL ADDED");
sprintf(str,"SELECTED %d",KUB);
GenScriptAdd(str);
# duplicate (basic translation y+=10*d)
GenScriptAdd("DUPLICATE");
# prepare for broken
GenScriptAdd("CONVERT_TO_WORLD");
GenScriptAdd("SETPLAIN");
# apply "broken" to the duplicate of "KUB"
GenScriptAdd("BROKE 1 3");
# store result as added objects
GenScriptAdd("CONVERT_TO_ADDED");
# set start positions as the same as "KUB" (y-=10*d)
GenScriptAdd("TPOSY SPACE");
# prepare for physics
GenScriptAdd("SETFULLMESH");
# select plane static object for view
GenScriptAdd("SETSEL WORLD");
GenScriptAdd("SELECTED 0");
# run script
GenScriptDo();
n=[start..nbWOADD()] createVertexBufferAdded(n);
Generated (nbWOADD()-start) objects of (KUB) broken.
For example, the "DUPLICATE" command, create the same object a "SPACE" step downside in the editor, so needing to add "TPOSY SPACE".
Moreover, some functionnalities can be accessed with pseudo-C functions.