Jump to content
johnnyboy

show ai name in sidechat [SOLVED: use customChat]

Recommended Posts

I'm adding voices to my mission, and using sidechat to show the text.  When I use sidechat, the player character's name (assigned via setName) is displayed in the chat on lower right of screen.  But other AI characters will not show the name for their sidechats.   I am using setIdentity and setName on all the AI characters.

 

How do I get the name of the AI chatting to show?

 

SOLVED:  The code below insures that the radio text displayed in lower left on screen is always prefixed with the units name (instead of stupid "alpha 1-2").  This works perfect for my SP needs.  For MP and using Mods you might have to change this...not sure.

JBOY_Channel = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "JBOY Radio", "%UNIT_NAME", [valdez, tinker, leader HeistTeam]];
tinker customRadio [JBOY_Channel, "heistYouDidGoodBro"];
valdez customRadio [JBOY_Channel, "heistIfArmedHesGoingDown"];
leader heistTeam customRadio [JBOY_Channel, "suckItFiveO"];

 

  • Thanks 2

Share this post


Link to post
Share on other sites

Here's how I set the identity and name for the player (valdez) and the AI (tinker):

valdez setIdentity "valdez"; 
valdez setName ["Valdez, Jr.","Bob","Valdez"];

tinker setIdentity "tinker"; 
tinker setName ["Tinker Tavu","Tinker","Tavu"];

The identities are clean in the config (because i see they are getting the right faces assigned).

 

I'm doing dialogue like this:

valdez sidechat "Sorry Tinker, looks like your cousin is dirty."; 
valdez sideRadio "heistCousinIsDirty";

tinker sidechat "I can't believe it, I must talk to him.  We can't shoot him.";
tinker sideRadio "heistCantShootHim";

The correct voice file is played, and the correct text is displayed.  But where the text is displayed in the lower left, the player lines are prefixed with "Alpha 1-1 (Valdez):  Sorry tinker...", but the ai lines are prefixed with just the group unit id like this:  "Alpha 1-2:  I can't believe it...".  I want to see the AI names in the prefix so its clear which character is speaking.

 

In the console I used name command to verify that tinker's name is set, and it showed "Tinker Tavu" for the name, which is correct.

 

Share this post


Link to post
Share on other sites

Ahhh... lol... gotcha...

 

Get out the hacksaw ;)

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

With a little more digging I discovered customRadio, which totally solves this for me:

JBOY_Channel = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "JBOY Radio", "%UNIT_NAME", [valdez, tinker, leader HeistTeam]];
tinker customRadio [JBOY_Channel, "heistYouDidGoodBro"];
valdez customRadio [JBOY_Channel, "heistIfArmedHesGoingDown"];
leader heistTeam customRadio [JBOY_Channel, "suckItFiveO"];

The above code guarantees that the radio text displayed in lower left of screen is always prefixed with the speaker's name!!

 

:hyper:

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
59 minutes ago, johnnyboy said:

which totally solves this for me:

...you're not alone...THAT bring light to my neverending SP-mission making-darkness as well, brother!!!:don12:

 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, johnnyboy said:

With a little more digging I discovered customRadio, which totally solves this for me:


JBOY_Channel = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "JBOY Radio", "%UNIT_NAME", [valdez, tinker, leader HeistTeam]];
tinker customRadio [JBOY_Channel, "heistYouDidGoodBro"];
valdez customRadio [JBOY_Channel, "heistIfArmedHesGoingDown"];
leader heistTeam customRadio [JBOY_Channel, "suckItFiveO"];

The above code guarantees that the radio text displayed in lower left of screen is always prefixed with the speaker's name!!

 

:hyper:

Nice find man!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×