Map Script help: Monitor player text.
Moderator: Core Staff
-
- 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.
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.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Map Script help: Monitor player text.
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
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
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
-
- 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.
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?
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Map Script help: Monitor player text.
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()"
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()"
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
-
- 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.
Well then...I can already create my own quick message messages and sounds, etc...That sucks. Thank you, man, Kyle Mulliger.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Map Script help: Monitor player text.
No probs, let us know if you get stuck...
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
Who is online
Users browsing this forum: No registered users and 27 guests