Author Topic: Companion listening patterns  (Read 594 times)

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Companion listening patterns
« on: February 05, 2016, 10:24:50 pm »


               In a module with multiple henchmen, is it possible to script a shout from the player that emulates their radial menu commands?


I know that their OnConversation script listens for the radial menu patterns.


What I have in mind is a one-click method to get the whole party to Stand Your Ground, Follow, Attack Nearest or whatever.
               
               

               
            

Legacy_Tchos

  • Sr. Member
  • ****
  • Posts: 454
  • Karma: +0/-0
Companion listening patterns
« Reply #1 on: February 06, 2016, 02:17:05 am »


               

They're listening for it.  You just have to have something speak it.  Stuff like SpeakString("ASSOCIATE_COMMAND_STANDGROUND", TALKVOLUME_SILENT_TALK);



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Companion listening patterns
« Reply #2 on: February 06, 2016, 08:30:10 am »


               Unfortunately, that doesn't work, even if shouted.

As I understand it, ASSOCIATE_COMMAND_STANDGROUND is the constant (-2) which is returned when the listening associate hears the shout. What I'm looking for is the string to be spoken, which I guess is something else, but I don't know where to find it.
               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Companion listening patterns
« Reply #3 on: February 06, 2016, 08:52:40 am »


               Never mind. It turns out that you don't need the shout, because you can force the response. For example,


int n = 0;
object oNPC = GetHenchman(oPC, ++n);

while (GetIsObjectValid(oNPC))
  {
    AssignCommand(oNPC, bkRespondToHenchmenShout(oPC, ASSOCIATE_COMMAND_STANDGROUND));
    oNPC = GetHenchman(oPC, ++n);
  }