trigger OnAttach() { debugSpeakMsg( self, "attached" ); return SCRIPT_CONTINUE; } trigger OnSpeaking( string text ) { if ( text.equals( "go" )) { obj_id lookAt = getLookAtTarget( self ); if ( lookAt == null ) return SCRIPT_CONTINUE; listenToMessage( lookAt, "handleBroadcast" ); debugSpeakMsg( self, "subscribed" ); } return SCRIPT_CONTINUE; } trigger OnHearSpeech( obj_id speaker, string text ) { dictionary stuff = new dictionary(); stuff.put( "objid", self ); if ( text.equals( "send" ) ) { broadcastMessage( "handleBroadcast", stuff ); debugSpeakMsg( self, "broadcast" ); } return SCRIPT_CONTINUE; } messageHandler handleBroadcast() { debugSpeakMsg( self, "received from " + params.getObjId( "objid" )); return SCRIPT_CONTINUE; }