Quote:
Originally Posted by Angel_Light
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
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.