Bioware Archive
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
SMF - Just Installed!
Home
Help
Login
Register
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Help with a very simple script. (NPC floaty text)
« previous
next »
Print
Pages: [
1
]
Author
Topic: Help with a very simple script. (NPC floaty text) (Read 321 times)
Legacy_Lethal_Bottle
Newbie
Posts: 28
Karma: +0/-0
Help with a very simple script. (NPC floaty text)
«
on:
November 18, 2013, 03:53:22 am »
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!
Logged
Legacy_Fester Pot
Hero Member
Posts: 1698
Karma: +0/-0
Help with a very simple script. (NPC floaty text)
«
Reply #1 on:
November 18, 2013, 04:28:29 am »
Above the following line,
if (GetLocalInt(oPC, "henchspeak1") == FALSE)
add this line,
if (!GetIsPC(oPC)) return;
FP!
Logged
Legacy_Lethal_Bottle
Newbie
Posts: 28
Karma: +0/-0
Help with a very simple script. (NPC floaty text)
«
Reply #2 on:
November 18, 2013, 04:46:11 am »
Thank you very much! I will test it out later.
Great to see how helpful the NWN1 community is still
'>
Logged
Print
Pages: [
1
]
« previous
next »
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Help with a very simple script. (NPC floaty text)