I’ve came to notice that for both my and other encounter systems, the spawned creatures react pretty slow in comparison with the vanilla encounter system. I wonder if there is a way to make the creatures to react to the encounter faster?
Right now, the best script I came up with is the following:
if(GetDistanceBetween(creature, pc) > ATTACK_DISTANCE) return; if(InvisibleTrue(pc)) return; AssignCommand(creature, DetermineCombatRound(pc));
Used alone, the
DetermineCombatRound makes the creatures to attack pcs which they can’t see, like for instance invisible ones. This is where the
InvisibleTrue came from, which returns
TRUE if the PC is either invisible or stealth. And then there is a distance check to make sure that the creature will not dash 2km in the direction of the player when it is spawn.
If I use
DetermineCombatRound without sending the player as parameter, this does nothing, since the creature have not perceived the player yet.
Of course this is less than ideal. Ideally the code would look like this, but I’m not sure if the first function exists:
Is there a
RefreshPerceptionTable function? If this can’t be triggered manually, do you have suggestion on how to improve the code I’m currently using?
I’m using NWNEE.
Thanks for your time!