Hi All,
In my module in a MP game, any player can take control of companions off the leader.
This works reasonably well, but I have noticed one problem ....
If the player who is controlling the companions talks to an NPC, at the end of the conversation, the companions turn around and run after the leader (main player) again. They are easy enough to call back by using the "Follow Me" command, but I want to avoid this sudden running over from the player they are currently following.
It's as if a "hidden script" is firing after a conversation ends, which has nothing to do with any scripts attached to the conversation itself, as I have checked that there are none attached there.
I know I could (perhaps) write a script to add to the end of every conversation, but I want t avoid that if possible.
So ... the question is ... does anybody know what is happening after the conversation ends? What is the game doing? Is it firing off a script that I do not know?
Many thanks in advance.
Lance.
"Hidden Script" Firing After Conversation Ends ... Multi-Player Coding
Débuté par
Lance Botelle
, sept. 16 2011 03:30
#1
Posté 16 septembre 2011 - 03:30
#2
Posté 16 septembre 2011 - 04:54
I have noticed similar behavior in SP mode as well. I always use the icon in the lower left corner of the screen to turn of AI. Sometimes when I switch between companions, all the companions will stop what they are doing and come to the newly controlled companion.
#3
Posté 16 septembre 2011 - 05:41
M. Rieder wrote...
I have noticed similar behavior in SP mode as well. I always use the icon in the lower left corner of the screen to turn of AI. Sometimes when I switch between companions, all the companions will stop what they are doing and come to the newly controlled companion.
Hi Matt,
I have managed to iron out many of the things you say regarding the AI. However, perhaps there is a variable being set (when a conversation is started) to activate a script after the conversation is ended ... in a "hard-coded" type of way?
Basically, if the leader of a MP game talks to an NPC, the moment the conversation ends, all the companions move toward him/her even if I have currently forced them to follow a different player. It's as if there is a "reset" of the follow command referring to some other code that I have not yet got hold of and altered ... and is forcing the follow back onto the leader.
A hidden shout somewhere perhaps? ... although I have already edited who the companions will respond to with respect to shouts and they should/do ignore normal shouts by the leader when being controlled by another player.
Any more ideas .. anybody?
Lance.
Modifié par Lance Botelle, 16 septembre 2011 - 05:42 .
#4
Posté 16 septembre 2011 - 06:58
Hi All,
Just to report that I eventually tracked it down ....
I have changed many of the scripts that work the companions. However, one that I have not changed directly was the gb_comp_heart, as it allows me to attach my own HB script as a variable. HOWEVER, this script also fires the gb_assoc_heart script at the end, which, in turn, handles some of the companion AI after miscellanoeous events, like just having a conversation.
At the bottom of this script is a function called HenchFollowLeader, which left as it was forced the companion to follow the leader after the conversation. I simply edited this out and added a small amount of code to ensure they stayed following the correct player.
Better that than change the function within the include I feel.
Lance.
Just to report that I eventually tracked it down ....
I have changed many of the scripts that work the companions. However, one that I have not changed directly was the gb_comp_heart, as it allows me to attach my own HB script as a variable. HOWEVER, this script also fires the gb_assoc_heart script at the end, which, in turn, handles some of the companion AI after miscellanoeous events, like just having a conversation.
At the bottom of this script is a function called HenchFollowLeader, which left as it was forced the companion to follow the leader after the conversation. I simply edited this out and added a small amount of code to ensure they stayed following the correct player.
Lance.
Modifié par Lance Botelle, 16 septembre 2011 - 06:58 .





Retour en haut







