I ment you could make an offline system script like this. This method checks the current level's filename to set the approiate map automaticailly, instead of having a bunch of setmap NPCs inside the levels, this method works better and is less buggy for users in my experience, but I haven't tried anything like it with an NPC server so I wouldn't know if it still works.
NPC Code:
// Script created by Ray P. Soucy <[email protected]>
// This is the System Script for Legends of Graal
if (created)
{
// Add this Script to the Player ("-" denotes a hidden script)
toweapons -system-;
}
if (created || timeout)
{
// Setup the Map and Minimap
// Overworld Levels start with "log-"
if (startswith(log-,#L))
{
setmap log-map.png,log-map.txt,0,0;
setminimap log-minimap.png,log-minimap.txt,0,0;
}
// Reset the timer, end of script.
timeout = .05;
}
EDIT:
The levelnames in this case are "log-x,y.graal". e.g. "log-0,2.graal"
I also use this method for other things like assigning MIDI files to certain levels.
It's better to have your scripting centralized.
Kigan
