These wiki pages should help you a bit with your understanding of clientside/serverside:
http://wiki.graal.net/index.php/Clientside
http://wiki.graal.net/index.php/Serverside
http://www.graal.net/index.php/Creat...Starting_Guide
http://wiki.graal.net/index.php/Crea.../Script/Client (explains how to communicate between serverside and clientside)
What?
Not sure exactly, but Stefan said at several times not to, so that suggests to me that perhaps he checks what the script is in and decides how to parse it or something like that could be added later.
And yeah, GS1 just uglifies a beautiful script. GS2 is also considerably more efficient than GS1.
Haha yes, correct.
It doesn't, the only time the parser reads anything that starts with "//" is when it is
//#CLIENTSIDE. The ones I placed after the join were just labels.
You should always use putnpc2 now anyway; just put the code in a class rather than a text file.
Only if you used 'client.' vars. You should always use clientr (or serverside player. vars) for storing sensitive information.
If you want them to be dynamic (randomly placed), you should use a database NPC with something like the following
PHP Code:
function onCreated() {
// init vars
this.mapSize = {3, 3}; // width, height in levels
this.classesToDrop = {"baddy"};
onTimeOut();
}
function onTimeOut() {
temp.tries = 0;
while (tries < 5 ) {
temp.dpos = {random(0, this.mapSize[0] * 64), random(0, this.mapSize[1] * 64)};
if (! onwall2(dpos[0] - 3, dpos[1] - 3, 6, 6)) {
// should improve the above checks, it's just an example.
temp.classToJoin = this.classesToDrop[int(random(0, this.classesToDrop.size()))];
temp.drop = putnpc2(dpos[0], dpos[1], "");
drop.join(classToJoin);
}
tries ++;
}
setTimer(360); // could also add a way to check how many baddies there are.
}
Otherwise, if you want them in static locations, just make a level NPC (with level editor) with this:
PHP Code:
join("baddy"); // or the other class