Quote:
|
Originally Posted by Yen
Well, objects also have names.
You do normally need to do with (players[]), but you could also do something like:
PHP Code:
reference = findplayer("Yen");
with (reference) {
}
You can also just put in the name of a GUI object, and it will automatically refer to that GUI.
|
Just for clarification, it doesn't have to be a variable either. If a function returns an object, you can use the function itself.
PHP Code:
with(findPlayer("Yen")) {
player.chat = "Hi thar";
}
You can also do:
PHP Code:
this.foo = new TStaticVar();
this.foo.bar = "Wee"
this.foo.baz = "Woo";
with(this.foo) {
echo(bar);
echo(this.baz);
}
would output: