I did not reinvent the wheel. Higor pointed nice codes in how to launch certain function only in certain map. Also in said function you can "dynamicloadobject" something specific for a map based on its name - this is how was born NavAdder supporting a lot of such plugins/modules/components/adds.
Code: Select all
LevelName = String(Outer.Name);
...
log ("Map's name is:"@LevelName,'NavAdder');
LevelName0 = Caps("SS_NVAD"$LevelName)$".PathsMapper";
log ("Personal seeking strategy: Looking for a class called >"@LevelName0,'NavAdder');
Module = Class<Actor>( DynamicLoadObject(LevelName0, class'Class',True) ); //Warning at plain UT with this "True" - it might be a hazard
if ( Module == None )
{
...
//Report something
}
else
{
// Spawn it
log ("Found module, attempt loading... "$Module,'NavAdder');
Spawn(Module);
if ( Module != None )
log ("Module has been started...",'NavAdder');
else
log ("Bork... Module failed to spawn in this Level...",'NavAdder');
}
Monster Gaming Server is running several maps "re-edited" in run-time this way. Very visible tweaked map sample: MH-MinasTirith (and not only that).
Advantage XC_Engine mapping as ServerPackages automatically these "for-client" plugins directly if are found... no ini file edited is ever needed but NavAdder's white list (maps that are always excepted for any reasons).