loadMission(filePath);
Run a trace and start the tutorial. You should be able to tell what it spits out.
I made something like this once, I'll try to find it.
function clientStartMission( %name ){ startMissionGui.onWake(); %count = SM_missionList.rowCount(); %found = false; for ( %i = 0 ; %i < %count ; %i++ ) { %row = SM_missionList.getRowText( %i ); if ( getField( %row, 0 ) $= %name ) { %found = true; SM_missionList.setSelectedRow( %i ); break; } } if ( !%found ) { return false; } // Change server preferences ($Pref::Server::Preference = value) // Change add-ons enabled ($AddOn__FolderName = troolean) // Change music enabled ($Music__FileName = troolean) SM_missionList.select(); startMissionGUI.clickSinglePlayer(); SM_StartMission();}
When you start a mission, it execs the .mis file. The tutorial's .mis file has all the scripts in it after all the mission stuff.