Author Topic: Chat message sent  (Read 906 times)

I'm trying to make an add-on for myself, but is there like a onChatMessage but with code?

for example:

if I said hi, it would say "hi" in a chat voice.

this doesn't use a program



btw I'm a beginner coder so I don't really know how to word it :l

I'm not quite sure what you're asking. If you're asking how to detect when you send a message, you should parent NMH_Type::send(). Like so:

Code: [Select]
package myChat {
    function NMH_Type::send(%this) {
        %message = %this.getValue();
        //your stuff here with %message
        parent::NMH_Type::send(%this);
    }
};
activatePackage(myChat);

ok, that answered my question, i guess.

i'm confused? can you say it in non-coding related terms? you want it to say "hi" from your speakers or something?

I think he means text to speech. The only way you can do this is by using a text to speech system which can be accessed through a TCP Object, I assume.

I know that Port used a Python-coded text to speech when he did it once.