Quote:
Originally posted by Kigan
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
|
Just a side note i also probably made a small error:
Please dont make more timeouts than neccesary (I dont realy care if you do but its best to reduce that ammount make something more along the lines of this)
Mainly be because you only need to check the level name when a player enters the level.
This is in all cases although 50 weapon npcs with .05 timeout scripts doesnt lag the server it does lag on older client systems.
NPC Code:
//In Control NPC
if (playerisonline) {
if(!hasweapon(-Mapping)) addweapon -Mapping;
}
NPC Code:
//IN Weapon NPC -Mapping
if (playerenters) {
if (startswith(VARHERE,#L)) {
setmap VARHERE_map.png,VARHERE_map.txt,0,0;
setminimap VARHERE_minimap.png,VARHERE_map.txt,0,0;
}
}
And on subject yes it would be nice to have the editor ask for the map text file name when making a map, or maybe it and many other things could be in a seperate developer program? like tiledat editing, dungeon generator, level generator, terrain editor , and any other spiffy stuff put in one nice development program

Especialy if the new Remote controls online level editing and offline wont be used too much or at all that would be a nice prog to have.
Gnight im cant see my eykborad