• 🏆 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!

Simulated Chat

Status
Not open for further replies.
Level 6
Joined
May 1, 2009
Messages
215
Hi,

I have a fundamentally simple question, but it's not one that searching has revealed an answer for.

I'm creating a map that will have two computer AIs. I want them to "talk" to each other (and the human players), with scripted times to show chat strings to the human players. I don't want dialog or cinematics. I want them to taunt players in normal chat (and I also want to give them scripted responses to what the players say, responding to certain words I might expect them to say in response).

But first and foremost, I just need to know how to make a computer player enter a chat response. I know AI will say "gg", so it's certainly possible, but I can't find the specific action anywhere.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
native bool AIGivingUp (int player);
native void AIGoodGame (int player);

The messages they send are hard coded and not customizable.

Try this however...
const int c_messageAreaChat = 1;
native void UIDisplayMessage (playergroup players, int messageArea, text messageText);

Aka...
UIDisplayMessage (playergroup players, 1, "your text here, might want a localized string...");
 
Level 6
Joined
May 1, 2009
Messages
215
Then fix it... I can not help it if you just blindly copy and paste guidelines as code...

Sigh. Alright, I was just hoping you might know the issue off the top of your head. It's fine, zzz.

edit:
//Copy this line into custom script and replace playergroup players with a reference to a player group (variable or function/native).

I did all that, I'm not stupid you know :p I filled in all the stuff you needed to. Besides, that was line two anyway, what doesn't work is line one const int c_messageAreaChat = 1; which means const int is incorrect or c_messageAreaChat=1 isn't the right command.
 
Status
Not open for further replies.
Top