PHP Code:
//#CLIENTSIDE
function onCreated() {
addtiledef("TILESET.png", "LEVEL_START", 1);
}
"TILESET.png" is the filename of the tileset, e.g. "era_tileset-summer.png";
"LEVEL_START" is the start of the level. All your levels must start with this (it can be left blank to apply to all). For example, "era_"
The final number is either 0 or 1. 0 is the old-style tileset, which is like pics1.png. 1 is the new-style tileset, which is usually used on most servers that aren't a classic server/classic tileset variant.
You can add multiple lines as well. For example,
PHP Code:
//#CLIENTSIDE
function onCreated() {
addtiledef("era_tileset-summer.png", "era_", 1);
addtiledef("era_tileset-sewers.png", "era_sewers-", 1);
addtiledef("pics1.png", "era_chris-", 0);
}
If you want to remove the saved tiles, use the code:
PHP Code:
removetiledefs("");
right under the onCreated() function (before the addtiledef lines).
If you want to set the tileset in the level editor, do this (similar to the way for online):
PHP Code:
//#CLIENTSIDE
if (created) {
addtiledef era_tileset-summer.png, era_, 1;
}
Offline, to remove all saved tiledefs, put this code in a script (probably under the 'created' if statement):
PHP Code:
removetiledefs;