volker RE: question #9
Always remember that when 3drad crash's you'll have a undo copy -
so select [open] and browse to "c:\your 3drad folder\3DRad_res\system\undo"
display the files so the newest files are on the top of the list
the newest file ( based on date & time) will be the last change you made to the project.
load this file then save it.. ( you could overwrite your project, or save it as a new version.. your call )
you could go back a few files finding a change that maybe broke your project.. i wouldn't count on finding it though, cause 3drad saves every change you make, even just clicking on the screen without changing or moving anything may be counted as a change by 3drad and a backup copy made. ( it's possible to have 20 copies of the exact same project in your undo folder due to 3drads ( somewhat silly) backup process ).
I'm not sure if it's possible to use only 3drad objects and still crash a project ( i've never tried it ).
Most people run into problems with scripting...
Always click the [check script] button to test for syntax errors..
Just because the [check script] button doesnt find a problem, you can still have issues like an array moving out of range of the defined array.
A loop that never ends, or one that runs much longer than you intended it too, due to a variable that's set wrong.
try to keep your scripts in sections, if your script looks like spaghetti -
( spaghetti code is an old programming reference to script that has pieces spread all over, that cause your script to jump around line to line way more than it needs to ( resembling spaghetti all intermixed into a lump).
Also avoid repeating script pieces, if you could use a loop instead to make your script more visually easier to follow and debug.
( I've always contended that looping in a script DOESN'T help performance because the exact same code is processed lets say 30 times, which is equivalent to having all 30 lines of code typed out line by line. If anything, using a loop probably slows down processing due to the added looping code that gets processed 30 times on top of your 30 lines..)
I would say if you have a small piece of script that would only be looped say 5 times, going either way won't cause any noticeable problems.
A much larger piece of script that maybe involves 200 loops, will defiantly look cleaner in your script, and much easier to write than 200 typed out lines of script.
Also consider using loops that count once per engine cycle instead of running all 200 loops in one pass. ( this spreads out the processing over time and will make your project more responsive and smooth running... if your script would function properly with that loop setup.
int x=0;
void Main()
{
/// this loop pause's your program while all 200 loops are processed
for(x=200;x>0;x--){
//do something here;
//and here;
//and here;
}
/// this loop spreads out you loop over 3.333 seconds
/// then resets to 0 to start again
/// if the code doesn't require all 200 loops in one engine cycle
/// use this method instead !
x++;
//do something here;
//and here;
//and here;
if(x>200)x=0;
Also don't count on 3drads internal error system to tell you went a problem happens, in my experience, even if an error box pops up at run time, it likely will only popup once until you reboot your computer, i don't believe closing and opening 3drad corrects this, you'll have to reboot.
Also, only 1 error box, if any even popup, will be shown per project, no matter if you have say 5 errors.. I believe 3drad will stop the broken script, but continue to run the project anyway..
As always, if i made a mistake, i was the other guys fault, not mine
.