Open weavejester opened 3 years ago
Daz' WAR from discord:
// NWNX_ON_CLIENT_DISCONNECT_BEFORE
void main()
{
object oPC = OBJECT_SELF;
if (GetCutsceneMode(oPC))
SetCutsceneMode(oPC, FALSE);
}
Cutscene mode will drop another TURD and exiting while it is enabled will (re)store the wrong values.
I have an odd bug where
NWN_Object_GetInt
returns 0 for a variable, while in the character bic file I can see that the value is 16.This occurs during the beginning 'cutscene' conversation of our module, before the PC is granted full control over their character. My guess is that NWNX variables from the character file are not loaded until the PC is given control of their character, possibly because the events NWNX hooks into to load the data haven't fired yet.
If I set a persisent variable in this cutscene with
NWN_Object_SetInt
it is written to the character's bic file. I can retrieve this variable withNWN_Object_GetInt
. But if I exit and relog before the cutscene has completed, thenNWN_Object_GetInt
returns 0, despite being able to see the value in the .bic file aas having been set correctly.