Blockland Forums > Modification Help
Loading a Mission
<< < (2/2)
Brian Smithers:

--- Quote from: Greek2me on February 02, 2012, 01:09:33 AM ---Run a trace and start the tutorial. You should be able to tell what it spits out.

--- End quote ---
K
Port:

--- Quote from: Port on February 01, 2012, 01:43:04 PM ---I made something like this once, I'll try to find it.

--- End quote ---

I can't really find it, but I tried remaking it. I didn't test this, though.

--- Code: ---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();
}

--- End code ---
Khepri:

--- Quote from: Chrono on February 02, 2012, 02:03:47 AM ---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.

--- End quote ---
This is the correct way to do it.
Navigation
Message Index
Previous page

Go to full version