• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[GUI]Talk System v1.3

  • Like
Reactions: EmoBrother
Okey since I can't find one here so I make one and uplaoded it.

Talk System v1.3

What is this?
Basically, this is a MPI systems which make player's chat messages to, only show to players, who have their specific unit within the check range of the player's unit, just like normal talking.

For example, '/y' stands for 'yell', if someone typed something with this prefix, players which have their specific units within 1350 range of this player's specific unit will be able to see what exactly this player says, and so on.

You'll be able to:
1. Set how many prefixes you wanted to have.
2. Set the check range of every prefixes.
3. Enjoy realistic talking in warcraft III.


  • TS Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Did you want the message to show to enemy? True if you want to. --------
      • Set TS_EnemyCheck = True
      • -------- How many player will be using this system? --------
      • Set TS_PlayerCount = 10
      • -------- Here you set the prefix word to be used. --------
      • -------- Don't set anything with the array [0], it will not work. --------
      • Set TS_String_Prefix[1] = /w
      • Set TS_String_Prefix[2] = /s
      • Set TS_String_Prefix[3] = /y
      • -------- Here you intialize the words added after player's name, when he's talking. --------
      • Set TS_String_Show[1] = whispers:
      • Set TS_String_Show[2] = says:
      • Set TS_String_Show[3] = shouted:
      • -------- Here you set the maximum prefixes number that are used. --------
      • Set TS_PrefixCount = 3
      • -------- The message will only show to players which have their unit within the range. --------
      • -------- The array is corresponding to the arrays you declared above, --------
      • -------- Thus TS_CheckingRange[1] is the TS_String[1]'s range check and so on. --------
      • -------- Don't set anything with the array [0], it will not work. --------
      • Set TS_CheckRange[1] = 200.00
      • Set TS_CheckRange[2] = 550.00
      • Set TS_CheckRange[3] = 1350.00
      • -------- Here you set color codes for each player. --------
      • -------- Hits: If you already have initialized some color code, you can set these strings to those color code. --------
      • Set TS_ColorString[1] = |CFFFF0303
      • Set TS_ColorString[2] = |CFF0042FF
      • Set TS_ColorString[3] = |CFF1CE6B9
      • Set TS_ColorString[4] = |CFF540081
      • Set TS_ColorString[5] = |CFFFFFF01
      • Set TS_ColorString[6] = |CFFFE8A0E
      • Set TS_ColorString[7] = |CFF20C000
      • Set TS_ColorString[8] = |CFFE55BB0"
      • Set TS_ColorString[9] = |CFF959697
      • Set TS_ColorString[10] = |CFF7EBFF1
      • Set TS_ColorString[11] = |CFF106246
      • Set TS_ColorString[12] = |CFF4E2A04
      • -------- Here we adds the events to allows players to use this system. --------
      • For each (Integer TS_Integer) from 1 to TS_PlayerCount, do (Actions)
        • Loop - Actions
          • Trigger - Add to TS Run Trigger <gen> the event (Player - (Player(TS_Integer)) types a chat message containing as A substring)
  • TS Run Trigger
    • Events
    • Conditions
    • Actions
      • Set TempString = (Entered chat string)
      • For each (Integer A) from 0 to (TS_PrefixCount - 1), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(TempString, 1, 2)) Equal to TS_String_Prefix[(Integer A)]
            • Then - Actions
              • -------- The custom script below gets the first unit selected by the triggering player --------
              • Custom script: call GroupEnumUnitsSelected(bj_lastCreatedGroup, GetTriggerPlayer(), null)
              • Custom script: set udg_TempUnit = FirstOfGroup(bj_lastCreatedGroup)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempUnit Not equal to No unit
                • Then - Actions
                  • -------- The string below is displayed to all valid players with units in range --------
                  • Set TempString = ((TS_ColorString[(Player number of (Triggering player))] + ((Name of (Triggering player)) + ( |r + TS_String_Show[(Integer A)]))) + (Substring(TempString, 3, (Length of TempString))))
                  • -------- The next variable filters out players who have already been shown the message --------
                  • Set TS_Shown = False
                  • Set TempLoc = (Position of TempUnit)
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within TS_CheckRange[(Integer A)] of TempLoc) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • TS_AllowEnemies Equal to True
                              • ((Picked unit) belongs to an ally of (Triggering player)) Equal to True
                          • TS_Shown Not equal to True
                        • Then - Actions
                          • Set TempPlayer = (Owner of (Picked unit))
                          • -------- Mark that the message has already been shown to this player --------
                          • -------- This avoids multiple messages --------
                          • Custom script: if GetLocalPlayer() == udg_TempPlayer then
                          • Set TS_Shown = True
                          • Custom script: endif
                          • -------- The script below avoids needing to create a "temp force" --------
                          • -------- This is because Blizzard didn't give GUI a "show to player" command --------
                          • Custom script: call DisplayTextToPlayer(udg_TempPlayer, 0, 0, udg_TempString)
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_TempLoc)
                  • Cinematic - Flash a speech indicator for TempUnit of color (100.00%, 100.00%, 100.00%) with 0.00% transparency
                • Else - Actions
              • Custom script: exitwhen true
            • Else - Actions
Credits:
-Maker, for teaching me how to hide chat messages.
-Bribe, for pointing out my mistakes and helps me to correct it.

Versions:
v1 - Initial Release
v1.1 - Fixed a major bug and took Bribe's suggestion.
v1.2 - Fixed some memory leak
v1.3 - Script should be bugless + lagless thanks to Bribe.






Keywords:
talk, system, chat, secret, private talk
Contents

Talking System v1 (Map)

Reviews
20 Dec 2011 Bribe: Looks solid now of course. Approved with 3/5 status (can be useful).

Moderator

M

Moderator

20 Dec 2011
Bribe: Looks solid now of course. Approved with 3/5 status (can be useful).
 
Level 10
Joined
Mar 19, 2010
Messages
622
This is my first time to upload a resource to if I've done any mistake please tell me so that I can improve. Thanks a lot.

Edit: Updated the map with a major bug fix and used Bribe's suggestion.

Edit: Updated
 
Last edited:
Level 10
Joined
Mar 19, 2010
Messages
622
Sure. You should change it at your main window, where you can see your map's terrain. Up on the tool bar, you can see a button labled 'Advance'. Click it. Then choose 'Gameplay Interface'. The Chart part should be at the topmost. Make sure the little box up the poped up winder's left is checked or you can't edit any things in it.
 
Level 6
Joined
Apr 1, 2009
Messages
201
To be able to change the chat options in the game interface, you have to download " GameInterface101 " and extract the two files into your Warcraft 3 folder. It allows you to see/change those options mentioned in the instructions.

Also if you plan on using this for games on Bnet, change the text prefix. The prefix " / " is used by the game chat and won't work for the system.

Great system +rep
 
Top