View Single Post
  #7  
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