Disable chat

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
Well... you could start with taking the messages away.
You need to import two things into your map.
1, an empty sound file (replacing the sound used when someone else sends a message that you recieve)
2, a text file which removes all players from the recipients of the messages that are sent.
(both are uploaded with this post)

You have to import the sound file under the path "Sound\Interface\InGameChatWhat1.wav"
and the text file under the path "war3mapSkin.txt"

Once you have done that, you have removed chat messages from the game.
You can still catch the messages with the player sends a chat message event.

So you create a trigger:
  • ChatMessage
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
      • Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
      • Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
      • Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
      • Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
      • etc...
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (Entered chat string) above Heroes[(Player number of (Triggering player))] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set TextTag = (Last created floating text)
      • Floating Text - Set the velocity of TextTag to 16.00 towards 90.00 degrees
      • Floating Text - Change TextTag: Disable permanence
      • Floating Text - Change the lifespan of TextTag to 10.00 seconds
      • Floating Text - Change the fading age of TextTag to 8.00 seconds
Maybe you can find a calculation for the duration of a text message (which is based on the length of the message) to optimize the usage of this stuff.
You have to add the events for all players and use the unit that is your player's hero. (who should be in array format respective to their owner's id or number)
 

Attachments

  • Stuff.zip
    391 bytes · Views: 62
Status
Not open for further replies.
Top