Here is an alternative.
PHP Code:
function onActionGrab() {
this.level.chair.trigger("ActionShock", "");
}
PHP Code:
function onCreated() {
this.setshape(1, 32, 32);
this.level.chair = this;
}
function onActionShock() {
// do stuff
}
The this. prefix isn't required in this instance but it is my preference to do it like that so you clearly know what the variable belongs to.