Hello everyone. This is a very simple script that I need fixing.
Here is the script.
void main()
{
object oPC = GetEnteringObject();
object oDisplay = GetObjectByTag("Henchman");
if (GetLocalInt(oPC, "henchspeak1") == FALSE)
{
AssignCommand(oDisplay, SpeakString("Who goes there?"));
SetLocalInt(oPC, "henchspeak1", TRUE);
}
}
The script is so when the PC enters a trigger. The Henchman has a floaty text appear above him. I have them scattered through the module so that he can drop little nuggets of wisdom from time to time.
The problem is the script fires when the PC enters and AGAIN when the Henchman enters. Meaning he says everything twice.
Can anyone help me fix it?
Thanks!
Help with a very simple script. (NPC floaty text)
Débuté par
Lethal_Bottle
, nov. 18 2013 03:53
#1
Posté 18 novembre 2013 - 03:53
#2
Posté 18 novembre 2013 - 04:28
Above the following line,
if (GetLocalInt(oPC, "henchspeak1") == FALSE)
add this line,
if (!GetIsPC(oPC)) return;
FP!
if (GetLocalInt(oPC, "henchspeak1") == FALSE)
add this line,
if (!GetIsPC(oPC)) return;
FP!
#3
Posté 18 novembre 2013 - 04:46
Thank you very much! I will test it out later.
Great to see how helpful the NWN1 community is still
Great to see how helpful the NWN1 community is still





Retour en haut






