Listening Patterns For Main PC (RESOLVED)

I have an issue as follows:-

  1. Player has some created PCs and some “companions” (from world) in same party.
  2. Companions and Created PCs share the same scripts.
  3. Player possesses a “companion” (not a created) and broadcasts “STAND GROUND” from the companion and the Main PC obliges along with all other PCs. OK.
  4. Player now possesses a Created PC, broadcasts the same, but now the Main PC ignores the order and continues to follow the Created PC. (I thought I had this working OK.)

In my code, I have made it so the player (Main PC) uses the same default OnDialogue as the companions/Created PCs, but even when not being controlled (i.e. the player is controlling either a companion or another Created PC), this script does not appear to fire for the Main PC, so I appear unable to get any Listening Patterns for the Main PC (Player), even when unpossessed.

Yet, by the very nature/fact that the Main PC does appear to pick up the command from a “Companion” when possessed (but currently not the Created PC), suggests that the Main PC is listening for the shouts from some script somewhere. I have been unable to ascertain where the Main PC hears the shouts from to be able to edit the response to fix the STAND GROUND etc calls from Created PCs (when possessed).

Any guidance appreciated,

If I see the script I can give you a hand, it’s hard to say where could be the problem from just a general description.

Hi Clangeddin,

Thanks for responding … There is no specific script as such, but more of a request as to where the Main PC may be “listening” and “hearing” other PC shouts.

As it happens, I have managed to test an older v2.07 and (while broken in its own way), does have part of the code I think I need to make this work. I am going to see if I can spot where the key differences are and fix that way.

However, if the question as to where the Main PC “hears” can be answered, then that may also help expedite the process.

Thanks, Lance.

Hi All,

OK, I think I have narrowed down the problem to one script. I will look at the differences and fix that issue (to do with when the Main PC swaps control), and will release v2.21 when done.

Cheers, Lance.

hey Lance, I’m not saying that this is where it is, just that this is how those commands are handled in TonyAI scripts. That is, things might not be handled by a listen event, but by

‘gb_player_ud’ / ‘gb_assoc_usrdef’ - events:

calls: HenchFollowMaster();

calls: HenchGuardMaster();

calls: HenchStandGround();

I just glanced at the stock version(s) and didn’t see them there, though.

Hi KevL,

The above is where my error had crept in. :slight_smile: I found that I had edited something from my original edits of the gb_assoc_usrdef, which damaged the Main PC ability to follow the command.

Thankfully, I managed to track it down by comparing an older build. It’s been a while since I messed with the AI and the ballpark swapping of a couple of scripts - this one and the PC OnDialogue - helped me to narrow down where the problem lay. Then I spotted it!

Thanks for coming back with the info though, as it is recorded here now too. :slight_smile:

Thanks, Lance.