I am playing around with my NPC, trying to figure out if his scripts work before releasing him into beta. The mod compiles fine, and he joins my party just fine. The trouble is that he stops walking. I select a spot, and my party starts walking toward it. Then suddenly, inexplicably, my NPC's glowing green mark showing where he ought to end up, vanishes. He stops dead in his tracks, and that makes it incredibly difficult to play with him! We have not been anywhere NEAR the Underdark, so it is not due to a drow avatar or anything. I cannot figure out what is causing the problem. I read once there was something similar caused by a variable name being too long somewhere, but I am pretty sure all my variable names are under 30 characters. Is that the maximum? Any help is greatly appreciated!!!
Sillara
Stuttering and stopping
Started by Sillara, Apr 20 2004 09:52 PM
6 replies to this topic
#2
Posted 20 April 2004 - 10:55 PM
That sounds like the infamous stutter bug, where the NPC keeps trying to say something but can't figure out what to say. Something in the NPCs script might be telling the NPC to start a dialog, but there isn't a dialog with valid triggers to start. One way to test this is to create a top level dialog (just one line and exit is fine) with no conditions. If that dialog pops up, then you've figured out the problem. Well, in general terms at least. You're still stuck finding out where the problem is.
The first thing I'd do is try and figure out if the NPC should (or could) have any dialog under those conditions. Could any timers have expired? If not, then you've probably got a problem where the script is calling for a dialog at the wrong time.
The first thing I'd do is try and figure out if the NPC should (or could) have any dialog under those conditions. Could any timers have expired? If not, then you've probably got a problem where the script is calling for a dialog at the wrong time.
#3
Posted 21 April 2004 - 06:06 AM
If you're having trouble finding out where the problem is, then add some debugging code to each block of the script (DisplayStringHead(Myself,~ScriptName: Block #~), replacing, of course, the # with a different number for each script block.) When you see the same block number being displayed over and over again you'll know which script block is giving you trouble and can fix it from there.
#5
Posted 02 May 2004 - 12:40 PM
I have a question about the syntax for use in a script:
DisplayStringHead(Myself,~ScriptName: Block #~),
Wouldn't I have to replace ~Scriptname with the name of the script file or creature that is running it? Also, Iim assuming that it would be
DisplayStringHead(Myself,~ScriptName: Block 1~) etc and then Block 2 and so forth for each block I want to check. Also, do we need the tildes?
Sorry if this question has been asked over and over again but I'm a novice at this.
Thanks.
DisplayStringHead(Myself,~ScriptName: Block #~),
Wouldn't I have to replace ~Scriptname with the name of the script file or creature that is running it? Also, Iim assuming that it would be
DisplayStringHead(Myself,~ScriptName: Block 1~) etc and then Block 2 and so forth for each block I want to check. Also, do we need the tildes?
Sorry if this question has been asked over and over again but I'm a novice at this.
Thanks.
#6
Posted 02 May 2004 - 12:53 PM
The stuff between the tildes is the text that will appear over the .cre that's running the script, so you can make it whatever makes sense to you.
#7
Posted 03 May 2004 - 02:38 AM
Thanks - got it now. The confusion came cause I didn't recall seeing tildes in any of the .baf files I looked at.