Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jaheira's rain comment causing stutter for some conditions #9

Open
Gitjas opened this issue Oct 9, 2022 · 1 comment
Open

Jaheira's rain comment causing stutter for some conditions #9

Gitjas opened this issue Oct 9, 2022 · 1 comment

Comments

@Gitjas
Copy link

Gitjas commented Oct 9, 2022

bug report here: http://www.shsforums.net/topic/61589-jaheira-stutter-bug/?p=613987

What I see is some unforrtunaste scripting in jaheira1.baf. Variable Global ("ANMyrain", "GLOBAL", 1) is set with a check for !Global("ShadowWork","GLOBAL",0). But after the timer run, it is not checked again - I assume this is causing the stutter because it is checked in the dialogue state (ANMisc.d):

IF ~Global("ANMyrain", "GLOBAL", 2) !InParty("Minsc") !Global("ShadowWork","GLOBAL",0)~ THEN BEGIN jaheirarain
SAY @150
IF ~~ THEN DO ~SetGlobal ("ANMyrain", "GLOBAL", 3)~ EXIT
END
END

Good scripting practice is to check for all conditions in the script block, and then trigger the dialogue with one unique variable. This way, stutter bugs are much less likely.

Also, using "StartDialog("JAHEIRAJ",Player1)" is not a good way of starting a dialogue. It sets the NPC's dialogue to the specififed one. It's of no consequence here because JaheiraJ is Jaheira's joined dlg file, but better use StartDialogNoSet(Player1) instead.

@Austin-BG
Copy link
Owner

Thank you very much for reporting the problem! To be honest, this rain script and dialogue was the first thing I did when I was learning to code and started working on this mod. So I took as a sample a code snippet from some other mod where such commands were used. Now I see that this first code of mine was quite clumsy :( I'll fix it in the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants