Thread: Control-NPC
View Single Post
  #5  
Old 07-17-2006, 04:33 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
They start when they are declared.

They stop when no variables point to them.

I have found the reason why it didn't work.

PHP Code:
  this.testobj = new TGraalVar(); 
Umm... Try new TStaticVar();

TGraalVar is a number, string, array... Therefore, when you join a class, and assign the variable to another of TGraalVar, it doesn't destroy the variable. TGraalVar's attitude when assigned to another TGraalVar is that it copies the value of the other TGraalVar, rather than assigning the the variable to the new object.

This means that when you join the class a second time, the class is already there. The object didn't change, and so the object is still in the class. Because no additional memory was allocated for that specific object, there is no Created trigger.
Reply With Quote