Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Classes? (https://forums.graalonline.com/forums/showthread.php?t=71578)

Crow 01-20-2007 02:19 PM

Classes?
 
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

PHP Code:

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


Class script

PHP Code:

//#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

Quote:

Originally Posted by Twinny (Post 1266688)
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

Quote:

Originally Posted by Angel_Light (Post 1266765)
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.


All times are GMT +2. The time now is 12:39 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.