![]() |
NPC Bug
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... |
Re: NPC Bug
Quote:
|
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... |
hmph
1 Attachment(s)
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. |
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. |
1 Attachment(s)
*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. |
| All times are GMT +2. The time now is 11:29 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.