I got the follow part down, but I cant seem to get the NPC to talk to the player. Having the NPC force start a conversation with PC, and make it so the PC cannot move while in conversation.
Any help would be great - thanks in advance!
Script to Follow PC then Start Conversation?
Débuté par
Ugly_Duck_01
, févr. 19 2014 03:15
#1
Posté 19 février 2014 - 03:15
#2
Posté 19 février 2014 - 03:44
To make it so that the PC cannot move, activate the box in the conversation properties that says "Multiplayer cutscene". This works whether or not it's a cutscene-style conversation. It also prevents the player from escaping from the conversation, so be sure there's always a farewell/end dialogue line.
#3
Posté 19 février 2014 - 04:46
The conversation script ga_party_freeze will make the entire party uncommandable. Not only can't you choose to exit the conversation (as per Tchos's "Multiplayer Cutscene" suggestion), but companion AI is also suppressed. Using both would make sure no-one does anything you don't want them to.
Make sure you put ga_party_unfreeze on every possible end node of the conversation though, otherwise your companions will ignore you completely from then on.
Make sure you put ga_party_unfreeze on every possible end node of the conversation though, otherwise your companions will ignore you completely from then on.
Modifié par DannJ, 19 février 2014 - 04:47 .
#4
Posté 19 février 2014 - 06:05
Sometimes the NPC AI likes to think it knows better than any commands you give as well, so its not a bad idea to set the NPC AI to off/low before you trigger the AssignCommand for the convo.
#5
Posté 19 février 2014 - 12:57
im using Liloc Souls script generator. I don't know how to shut off the creature's AI via script. I checked the script generator's functions but nothing whas there. Help plz?
#6
Posté 19 février 2014 - 01:09
NM! I figured it out. If anyone else needs to know how to do this, here is the script:
//Goes OnPerceived of a creature
void main()
{
object oPC = GetLastPerceived();
if (!GetIsPC(oPC)) return;
if (!GetLastPerceptionSeen()) return;
ActionForceFollowObject(oPC);
ClearAllActions();
object oTarget;
oTarget = GetObjectByTag("CREATURE_TAG_HERE");
AssignCommand(oTarget, ActionStartConversation(oPC, "CONVO NAME HERE"));
}
//Goes OnPerceived of a creature
void main()
{
object oPC = GetLastPerceived();
if (!GetIsPC(oPC)) return;
if (!GetLastPerceptionSeen()) return;
ActionForceFollowObject(oPC);
ClearAllActions();
object oTarget;
oTarget = GetObjectByTag("CREATURE_TAG_HERE");
AssignCommand(oTarget, ActionStartConversation(oPC, "CONVO NAME HERE"));
}
Modifié par Ugly_Duck_01, 19 février 2014 - 01:09 .
#7
Posté 19 février 2014 - 01:10
No idea about Lilac Soul's Script generator, i write code myself.
You can use a function like: SetAILevel - http://www.nwnlexico...itle=SetAILevel
And just remembered, its often useful to clear action queues before issuing new commands. For this use: ClearAllActions - http://www.nwnlexico...ClearAllActions
Remember to use AssignCommand to direct the action to the NPC if the calling script is not being called by the NPC itself.
PS: If the above is out of your comfort zone, sorry, i'm just used to doing scripting directly.
You can use a function like: SetAILevel - http://www.nwnlexico...itle=SetAILevel
And just remembered, its often useful to clear action queues before issuing new commands. For this use: ClearAllActions - http://www.nwnlexico...ClearAllActions
Remember to use AssignCommand to direct the action to the NPC if the calling script is not being called by the NPC itself.
PS: If the above is out of your comfort zone, sorry, i'm just used to doing scripting directly.
Modifié par Loki_999, 19 février 2014 - 01:11 .





Retour en haut






