View Single Post
  #11  
Old 02-23-2006, 11:57 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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"); 
__________________
Skyld
Reply With Quote