Quote:
|
Originally Posted by JkWhoSaysNi
While each NPC does act like a class you cant make relationships between them (either inheritance or association) you can 'inherit' the classes in the class list on the server (which are basically deferred classes).
|
Can you think of a need to change the current system?
Quote:
|
Originally Posted by JkWhoSaysNi
I can call functions on an NPC by using triggeraction but really I should be able to do npcname.functionname.
|
PHP Code:
public function myFunction()
{
return true;
}
PHP Code:
objectName.myFunction();
Quote:
|
Originally Posted by JkWhoSaysNi
I can't do this: object = new Class(); (Please correct me if i'm wrong) which means I cant pass objects around.
|
Yes, you can.
PHP Code:
myVar = new TStaticVar();
myWindow = new GuiWindowCtrl("myWindow");
Quote:
|
Originally Posted by JkWhoSaysNi
Sure there's the player object which can always be accessed but sometimes it can be useful.
|
And with player classes, you can add functions to the player object, i.e
PHP Code:
player.addMessage("Hello there");