View Single Post
  #12  
Old 06-29-2006, 04:31 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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:
PHP Code:
Wee
Woo 
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote