PDA

View Full Version : Classes?


Crow
01-20-2007, 02:19 PM
I got a simple NPC in some of my levels which is just joining a class, nothing else...but after restarting Graal, its not there, so I have to do update level to show it...So my question is -> is this problem Graal or script related? I was not sure, but its not happening with my other classes, so I thought it might be a scripting problem :/

Admins
01-20-2007, 03:02 PM
Would need to know the script or at least the server name/level name.

Crow
01-20-2007, 04:17 PM
NPC Script

//#CLIENTSIDE
function onCreated() {
join("save");
}

Class script

//#CLIENTSIDE
function onCreated() {
setimg("e_save.png");
showimg(200,"light2.png",x-2,y-2.5);
changeimgcolors(200,.6,1,0,.5);
changeimgzoom(200,.5);
setshape2 4,5,{
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,22,22,0,
0,22,22,0};
}



I also noticed its not happening with this class only, and it happened in other levels too. Btw, its happening on Esteria (thats why I asked you to restart it, Stefan :P).

Twinny
01-20-2007, 04:28 PM
I've always joined classes serverside. I guess it doesn't actually matter?

Crow
01-20-2007, 05:17 PM
I've always joined classes serverside. I guess it doesn't actually matter?

Mh, I will just try it out I guess.

Edit: Omfg, that fixed it, thanx alot xD

Angel_Light
01-20-2007, 09:12 PM
Yeah it's needs to be serverside since it's reading a script from the server. :P

Crow
01-20-2007, 09:27 PM
Yeah it's needs to be serverside since it's reading a script from the server. :P

Seems logically...damn Im kinda dumb sometimes -_-

Angel_Light
01-20-2007, 10:10 PM
Don't worry, I've done worse. :P

Admins
01-20-2007, 10:22 PM
If possible you should join on serverside yes. It is possible to use join on clientside, but if they class is not loaded yet then the onCreated function will never be called, and so the npc is not shown.