Aller au contenu

Photo

Which - if known - #include controls generic triggers?


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Morbane

Morbane
  • Members
  • 1 883 messages
After being inspired by a post that mentioned making Companions be the coversation speaker, I decided to give this a try again - - - To try and make a Companion be the conversation speaker in a trigger activated conversation(s).

Here is the skinny on what Shallina gave me:

First when I adress to a conversation and launch a conversation I always refer to GetFirstPC(FALSE) or The Get event handler like GetSpeaker() and other thing like that.

GetFirst PC(TRUE) will always send you the main char back and that's somethign youdon't want. Only use it to get VAR and store VAR. In other case use the getfirstPc(false).


Secondly I changed the default speaktrigger script, one of the ginc. Not sure it's important for the compagnion beeing able to talk, it was related to the fact that when a speaktrigger is fired you got the whole party back to life.

I changed the default nw_c2_default4 for NPC. When the conversation begin I always force the player focus or selection on the party member that is in conversation.

This alone is not enought, I also changed the gb_comp_conv. When the NPC(compagnion or henchmen) is in conversation with the player, I force the focus on the main char when the conversation begin.

And of course I changed the gb_comp_spawn where I set the can talk to non_player creature to TRUE by default for companion.


The difference in what I am trying to do is there will not be an NPC per se - just the trigger - but as I write this I might have an insight: use the gtr_speak_node function instead of generic triggers - at least then I would know which #include to examine / modify.

But any further insights would be appreciated - 

#2
Morbane

Morbane
  • Members
  • 1 883 messages
Yay! I got it working... apparently gtr_speak_node has a variable parameter "DoNotChangePlayer" if set to 1 the entering object whether it is the PC or a Companion becomes the main speaker and remains so until the end of the conversation.



There are heaps of generic triggers in my mod that have to be converted to this method - but it is worth it to allow Companions the chance to make skill rolls first hand.



Man - I toiled over this and started a thread in the old forums but nothing worked with custom scripts - it was always there in gtr_speak_node. I was avoiding it - dont remember why anymore?