Hey everyone!
So I'm working on fixing the griff not spawning bug, and I've decided the best way to do it is by changing the OnEnter script of the Sand People Enclave module. I couldn't get the script to decompile, so I've actually modified the .ar file to point to a new script which then executes the default script.
Here's my script currently:
void main(){ ExecuteScript("k_ptat20aa_enter", OBJECT_SELF); object oEntering = GetEnteringObject(); object griff = GetObjectByTag("tat20_griff"); // If we've talked to the Czerka officer about Griff and Griff hasn't already spawned if((GetIsPC(oEntering)) && (GetGlobalNumber("tat_MissCaptive") == 1) && (GetIsObjectValid(griff) == FALSE)) { vector vPos; vPos.x = 42.87; vPos.y = 66.82; vPos.z = 14.61; // This is the angle the NPC should be facing float fAngle = 180.00; location test = Location(vPos, fAngle); CreateObject(OBJECT_TYPE_CREATURE, "tat20_griff", test); } }
Now the issue I'm running into right now is that it's spawning him even if he's already spawned from the original script BUT not from this script. So if I walk in the first time there are two griffs. I leave and come back, there are still only two griffs (so the GetIsObjectValid function is working for griffs spawned by my script, just not for the original griff spawned when the bug doesn't happen).
Why is the GetIsObjectValid function not working when the bug doesn't occur and griff is already spawned when my script runs?
Thanks!