I went back and tried
public function again after reading a post by fp4 and got something that ALMOST works.
CLASS A
PHP Code:
//#CLIENTSIDE
function onActionAHPhit() { // custom sword hit detection
temp.foobar = this.level.foobar;
temp.foobar.baz();
}
CLASS B
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.setimg("block.png");
this.level.foobar = this;
}
public function baz() {
this.chat = "debug";
}
The problem is only the last NPC to join Class B will receive the update. If I could get around that I would be all set.