Aller au contenu

Photo

Allow NPC's to converse as the player.


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
BartjeD

BartjeD
  • Members
  • 249 messages
This is for my Turn based combat mod, does anybody know how to allow NPC companions to start a conversation as if they were the player? (without the game switching to the player)

Thanks in advance! Posted Image

#2
Friar

Friar
  • Members
  • 293 messages
Go to triggers on the objects menu.
Select empty trigger
Then select SpeakTrigger.
Create the trigger in the spot you want for the conversation to take place.
After you have create the trigger select the trigger and open the properties menu.
In the properties menu select variables.
There is a conversation variable which you will want the value string to match the tag of the conversation you want initiated.

Modifié par koundog1, 16 octobre 2010 - 07:25 .


#3
PJ156

PJ156
  • Members
  • 2 983 messages
Are you wanting a cutscene style convo or one in which the player can select multiple nodes for the NPC?

PJ

#4
Shallina

Shallina
  • Members
  • 1 011 messages
Many thing to allow to do that.

The default game and script switch always to the player character.

The first thing to do is to check the "Can talk to non PC character" box for your compagnions. Then they can initiate the conversation. But this is not enought, you need to also edit every script related to begin a conversation, speak trigger script and, on conversation script (for player and NPC and compagnion) and probably a couple of other.

I made it work correctly, but I don't remember the extend of all what I changed for it to work without bug. the biggest trouble is a NPC that enter conversation with a compagnion and beetween the time the conversation start and script that started it, the player selectionned an other party member.

Then you have a conversation but the player isn't on the compagnion that converse and the game stay stuck. In order to corect this behavior you'll need a good scripting knowledge.

Modifié par Shallina, 17 octobre 2010 - 06:52 .


#5
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 592 messages
When working on the OC Makeover I found that to allow the companions to speak to NPC's I had to use a campaign spawn script that set the property "Can Talk to Non-Player Owned Creatures" to true for all spawned creatures. This can be done with function SetCanTalkToNonPlayerOwnedCreatures. It was not sufficient to set this to true on the companions themselves.



Regards

#6
BartjeD

BartjeD
  • Members
  • 249 messages
Alright, thanks for the replies!

[edit:] Yes I wanted a non cutscene conversation where the player selects the responses for the NPC, as if he or she is the NPC.

I don't think I'll have much bugs with inter-companion or NPC conversations because I want the PC to posses the companion and then select the choices for them. Outside of this I'll probably make / keep it impossible. Thanks for the heads up though Posted Image

Modifié par BartjeD, 17 octobre 2010 - 07:34 .