On HB scripts

Hi all,

can someone tell me if HB scripts run across areas in a module? I am certain this information has been answered at some point but I can’t find any info on it.

They can.

AFAIK, creature HB scripts run across areas, but you can prevent them from making any calculations if there’s no player in an area (to save CPU resources).

The line that controls that:

	if (GetAILevel() == AI_LEVEL_VERY_LOW) return;

https://nwnlexicon.com/index.php?title=GetAILevel

2 Likes

when debugging a complex situation and put a message at the top of the HB script(s)

then have to go back and add a condition

if (GetArea(GetFirstPC()) == GetArea(OBJECT_SELF))
{
    // SendMessageToPC()
}

to prevent the chatbox from getting flooded by every critter in the entire module …

1 Like