View Single Post
  #2  
Old 02-16-2009, 06:10 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.pngera_1;

Offline, to remove all saved tiledefs, put this code in a script (probably under the 'created' if statement):
PHP Code:
removetiledefs
__________________
Reply With Quote