• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Limit Entered Message Lines

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Yes, you buy a bigger monitor....

Even with a maximum lenth message of W or other insanly wide characters, a decent display should not let it take up more than 2 lines.

Additionally, if someone is doing it repetitivly, you may wish to /ignore him as that is the best solution against spam.
 
I didn't know /ignore command works in-game. Anyway, if you wish to control what's written or how long it is, you firstly need to be able of hiding entered text messages (http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=51307). Then, you will need something like this:
  • Trg
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Player(IntegerA) slot status) Equal to Is playing
            • (Player(IntegerA) user) Equal to User
          • Then - Actions
            • Trigger - Add to Trigger <gen> the event (Player - Player(IntegerA) types a message containg <Empty String> as A substring)
          • Else - Actions
  • Trigger
  • Events
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Length of (Entered chat string)) Greater than 500
      • Then - Actions
        • Game - Display to (All players) for 5.00 seconds the text (Substring(1, 500, (Entered chat string)))
      • Else - Actions
        • Game - Display to (All players) for 5.00 seconds the text (Entered chat string)
This way, text messages that contain characters more than 500, will be displayed till the 500th character.
 
Status
Not open for further replies.
Top