PDA

View Full Version : NPC Bug


entravial
06-24-2001, 04:33 PM
A friend found that if you use a disabledefmovement npc and have a putnpc command in it, the putnpc can't set flags or use variables other than this.

Please answer...

FxChiP
06-26-2001, 01:22 PM
Originally posted by entravial
A friend found that if you use a disabledefmovement npc and have a putnpc command in it, the putnpc can't set flags or use variables other than this.

Please answer...

For clarification, I think he's saying that the putnpc script can't set flags or use variables that aren't this.vars. I think...

FxChiP
06-26-2001, 01:31 PM
Have your friend check the putnpc txt script - I just tested the bug you mentioned, and the putnpc script sets global variables, flags, and this.vars just fine...

Make sure that your variable names are all the same completely... including how they're capitalized. For example, FxBug is not the same as FxBuG or fxBug.

Also, make sure that you're checking the right fields in the script debugger. The field for global/level-wide variables is the upper right hand corner. The field for this.vars set is in the bottom box in the second column (to the right of the area where you see the script). Also, in case you didn't know... pressing F6 pops up the script debugger. :)

Sorry if I over-simplified this or something...

entravial
06-26-2001, 06:25 PM
Hullo. AlphaFlame here... aka "a friend". What I meant was this...

If you should make an NPC, say if (weaponfired){disabledefmovement;} or so, and then have a keydown event, the putnpc can't set certain things right. I've included a zip with script/putnpc/screenshots samples. Either my graal is completely messed up, or it's a bug. I'll bet on the latter ;). And shush on the scripting. This is an example!

Oh yea, almost forgot... test 1 is the disabledef... test2 is another lil bug I found. To try test 1 right, use it with d, then press a.

Admins
06-27-2001, 08:01 AM
The only things that I can see in the
script is that you cannot lay the
testa.txt npc (because you don't
check for keydown(6) in a
timeout/loop) and when you
do the disabledefmovement
you cannot lay down the test.txt
npc because weaponfired is not
called when the default movement/
key handling is turned off.
Do a keydown(6) check there
too for laying down the npc, then it will
work.

entravial
06-27-2001, 11:05 AM
*AlphaFlame*

Hmm... I completely left that out in my test npc, but I have it in another NPC that made me notice the buggy... gah... here, I fixed it. No flag, no testvar increase.