Quote:
Originally Posted by killerogue
TStaticVar's by nature are made global objects when you name them I believe.
|
Graal is just automatically making a global variable that points to the object. Its not different than making a global variable to point to level npcs or to players. On Aeon when the player logs in I have
makevar("Player" @ player.account) = player;This was originally added so I could access any player using makevar() with an old script.
The only problem I'm seeing with my method is that
onCreated() is not called until after the function that is creating the object.
PHP Code:
function onCreated() {
temp.v = new TVector();
v.a = 5;
}
In this,
onCreated will be called in the new vector object after that function has finished.
PHP Code:
function onCreated() {
temp.v = new TVector();
sleep(0.1);
v.a = 5;
}
If you add in the sleep,
onCreated is called in the object while the current function is sleeping, this is something I would like without the use of sleep.
Basically I'm requesting an event
onJoinedClass or something that is called as soon as Graal joins the class script and before the next class is joined so I can execute functions that need to be done before continuing. If something like this already exists by all means point it out please
