Map Script help: Monitor player text.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Map Script help: Monitor player text.

Post by Uzumakibro93 » April 7th, 2010, 12:15 am

Hi there, I am working on a script that monitors what a player says and will play a sound for certain words. Like how the quick chat works, or how typing in words in Half Life 2 will return a sound. I have no idea where to start, except for possibly taking the iprintln function apart to see how it works. If no one knows or can help, I would appreciate someone telling me where I can find the file which contains the iprintln function, if it exists. Thank you, Kyle Mulliger.
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Map Script help: Monitor player text.

Post by Drofder2004 » April 7th, 2010, 12:49 am

Sorry to say this to you, but the only way to track text is using a third party software hooking into the console on the server.

The quickchat works with a simple selection system. You choose the option, the menu response system catches the selection and plays the corresponding item.

playSound() is the command the plays the sound.
sayText() forces the player to post text to everyone.
sayTeam() forces the player to send a message to just his team.

All of this can be found in _quickMessage.gsc

But, if you are trying to monitor the text itself and play a sound based on that text, stop here :)
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: Map Script help: Monitor player text.

Post by Uzumakibro93 » April 7th, 2010, 1:12 am

:(

Haha, I have scripted the "unscriptable" before, though... So have you all!
Hmm...If I were to monitor what is typed in (i.e. before you press "enter"), it would work hypothetically, right?
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Map Script help: Monitor player text.

Post by Drofder2004 » April 7th, 2010, 1:18 am

Nope, the only way to even consider this working is to use a menu.

You can monitor what is entered into a textbox (for example, Key Codes & Player name).
This is done by using the same method as I was mentioning with menu responses.

Check _menus.gsc "onMenuResponse()"
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

Re: Map Script help: Monitor player text.

Post by Uzumakibro93 » April 7th, 2010, 1:27 am

Well then...I can already create my own quick message messages and sounds, etc...That sucks. Thank you, man, Kyle Mulliger.
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Map Script help: Monitor player text.

Post by Drofder2004 » April 7th, 2010, 1:28 am

No probs, let us know if you get stuck...
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests