There are two detection methods with both their pros and cons. The first method just detects certain text and can be from any player. It can be good in situations where you would want this, and best of all it will not desync if you use an otherwise desyncing action because all players would run it (only in most cases, because if one person is spammed with messages and a person types in a command he might not receive it and desync. Of course, with single-player maps this is not a problem at all.)
The second method utilizes the fact that only your own text is green while the other players' are blue. The triggers can detect the green color byte and therefore only run for the player that typed it, however it is limited to only run actions that are local, such as Play WAV, Center View, Display Text, etc. Still pretty useful.
There are a few minor catches, though. For it to work properly, certain text need to be appended with a certain number of pre-determined characters as padding. The characters can be just spaces (which is what I chose for my test map), and the max you need to append is 3. So, for simplicity you could just always append 3 spaces to the end of your text. Also, the screen must be flushed with a large text display that covers all lines on the screen immediately after it detects text, or else it might not function properly.
The test map detects two text inputs from any of the players: "-music off" and "-music on" without the quotes. Obviously it gives the player the option to toggle in-game music by just typing one of those options. Remember to append 3 spaces after the text.
I'd also like to know what ideas you guys have as to what this can be applied to. Keep in mind most of the potential would be for single-player maps because majority of the actions will desync in multiplayer with the second method.
So far I thought of these:
Music toggling
Center view toggling (for an rpg or something)
"Yes" or "No" in an NPC dialog
Download
Post has been edited 3 time(s), last time on Jun 11 2010, 2:45 am by yoonkwun.
None.