Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 11-29-2007, 01:48 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
Quote:
Originally Posted by Angel_Light View Post
also, little common sense, classes must be joined serverside.
Wrong. It's a good idea to, but when you have a player class, it needs to be joined clientside.

You can't join clientside, then use functions serverside, but it does work vica-versa. I always join serverside, except for player functions.

Classes are a way to make a standard object, or a stand script. For example, for a staff block you might want to make a class so that you can just putnpc2, then join the class, rather then putting in the whole script. And this way, if you need to change something, you can.

Another way to use classes are to provide functions.

Class foo
PHP Code:
function onCreated()
{
  echo( 
"moo" );

Script in level MYLEVELDONTTOUCH.nw
PHP Code:
join"foo" ); 
Will echo "moo" in RC.

EDIT:
Also you said
Quote:
When you join something serverside it only uses the serverside portion of the class, and vice versa.
That's incorrect. When you join serverside, you get serverside & clientside functions, but when you join clientside you only get clientside functions.
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:27 PM.


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