New Premium Module: Tyrants of the Moonsea! Read More
noob questions about action queues
The following random script example I pulled from the internet:
int iUsrEvn = GetUserDefinedEventNumber();
if (iUsrEvn == 1001) /* OnHeartbeat */
/* if wounded and no longer in combat then rest and wander */
if ((GetCurrentHitPoints() < GetMaxHitPoints()) && !GetIsInCombat())
My questions are these:
If the heartbeat in NWN is every 6 seconds, wont calling ActionRest(); ActionRandomWalk() every 6 seconds completely fill up the action queue because they take longer than 6 seconds to complete, or does the queue have a finite limit of 2 and they just push anything already there off?
Also wont ActionRandomWalk() immediately cancel ActionRest(), so effectively the NPC will always be walking and never resting?