Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 02-24-2006, 01:11 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Quote:
Originally Posted by Skyld
Can you think of a need to change the current system?

PHP Code:
public function myFunction()
{
  return 
true;

PHP Code:
objectName.myFunction(); 
Where does the object name come from? Say I have 2 npc's in a level. I want to call a function on one from the other. Currently you can do this with triggeractions.

Quote:
Yes, you can.
PHP Code:
myVar = new TStaticVar();
myWindow = new GuiWindowCtrl("myWindow"); 
Yes but I want to my create my own classes. (Just a simple example. I dont really need to do anything like this but it would make gscript more flexible.)

PHP Code:
class myClass {
someVar "something";
someVar2;
public function 
myClass(a,b) {
this.someVar a;
this.someVar2 b;
}
public function 
stringRepresentation() {
return 
this.someVar this.someVar2
}

PHP Code:
myVar = new myClass("One""Two");
myVar2 = new myClass("Three","Four");
player.chat myVar.stringRepresntation();
say2(myVar2.stringRepresentation()); 
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:17 AM.


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