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!
Well, as a user of Warcraft III Game, we all know how to perform a command "chat", right ?
Just simply press "Enter" and type your words and press "Enter" again, and pops out the word we typed
Well, that's not the point, anyhow...
Is it possible to "hide" Chat Message ?
I know by chatting in "Observer Chat" will ONLY shows the text to the player BUT, I want so that EVEN if you're chat in [Allies] or [All], it will still show the Chat Message to the Triggering Player ONLY
Don't ask me why do I need this, but I saw an RPG uses this system
When we normal chat, the words are displayed to all corresponding players
But when we do special command like:
-load XXX-ZZZ-CCC
That Chat Message didn't appear to other player, but ONLY to the triggering player
I suspect the usage of GetLocalPlayer, eh ?
It was probably done with a small system and a bit of smart file importing.
At least, the systems I've seen worked like that...
After a bit of searching myself, I found this:
You need to import a text-file called "war3mapMisc.txt" with this in it:
Code:
[FontHeights]
WorldFrameChatMessage=0.001
This will make all chat-text dissapear (also in the logs).
Next thing you need to do is create some kind of system to mimic the regular chat (you read that correctly: we're going to redo warcraft's chat from scratch, just because we can).
We will use regular game-messages for this (or start out with regular game messages at least).
The problem is that they're a bit too big...
Remember the previous text-file? Well, let's add something...
I added the last line so the size of the triggered messages is equal to the regular chat messages.
Now we will start with the actual triggers...
This is actually very easy, the first thing we're going to do is set up the player colors.
Initialize Colors
Events
Map initialization
Conditions
Actions
-------- Color Codes --------
Set Color[1] = |c00ff0303
Set Color[2] = |c000042ff
Set Color[3] = |c001CE6B9
Set Color[4] = |c00540081
Set Color[5] = |c00FFFC01
Set Color[6] = |c00FE8A0E
Set Color[7] = |c00FE8A0E
Set Color[8] = |c00E55BB0
Set Color[11] = |c00106246
Set Color[12] = |c004E2A04
These colors look real enough to me.
For the chat-function we'll start out simple, like this:
Chat
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
Actions
Game - Display to (All players) the text: ([All] + ((Color[(Player number of (Triggering player))] + ((Name of (Triggering player)) + :|r )) + (Entered chat string)))
So it displays: "[All]" + Player(x) + ": " + string.
(The player with the correct color).
Let's see how that turned out...
How it would usually look:
How it looks like:
The only difference now is the spacing before the text and, obviously, that the channel "[All]" doesn't actually work correctly in our system.
You'll just have to forget about the spacing...
The "[All]" can be taken care of, but through other means.
For example: when a player types "-t [message]", the message will only be shown for his teammates, or when he writes "-load
Code:
", the message will only be shown for him etc.
All of this can be taken care of with a little help of substrings:
A simple example would be this:
[hidden=Simple substrings][trigger]Chat
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 1, 2)) Equal to -t
Then - Actions
Set String = (Substring((Entered chat string), 4, (Length of (Entered chat string))))
Game - Display to (All allies of (Triggering player)) the text: ([Team] + ((Color[(Player number of (Triggering player))] + ((Name of (Triggering player)) + :|r )) + String))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 1, 5)) Equal to -load
Then - Actions
Set String = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
Game - Display to (Player group((Triggering player))) the text: ([Loading] |c00666fffCode:|r + String)
Else - Actions
Game - Display to (All players) the text: ([All] + ((Color[(Player number of (Triggering player))] + ((Name of (Triggering player)) + :|r )) + (Entered chat string)))
[/trigger][/hidden]
Wondering how it looks?
Here's an example:
[hidden=Example Chat][img]http://img859.imageshack.us/img859/402/fakechat2.jpg[/img][/hidden]
Better would be to parse the load-code back to the colorizer (so it shows the same colors as when you saved the code).
This is just a base example though, you can add whatever you want (PM's are also doable).
Test-map attached...
Wow, so many words...
I'll try to capture all of those methods into my head
In the meantime, let me test and play with those methods
Thanks for the input !
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.