The module has no heartbeat. Only one area has a heartbeat, and that one only affects tagged creatures, none of whom are henchmen.
Details of the area hb, just in case
It’s probably unbelieveably clunky and inelegant, but it’s the only way I knew how to do it, so I did.
// (Ghosts vanish during day, appear during night. Changed from dawn/dusk because resting timeskip messed it up.)
void main()
{
object oPC = GetFirstPC();
if (!(GetArea(oPC) == OBJECT_SELF)) return;
if((GetLocalInt(oPC, "NW_JOURNAL_ENTRYcntr_ghost") > 1))return;
object oGhost1 = GetObjectByTag("cntr_ruin_ghost1");
object oGhost2 = GetObjectByTag("cntr_ruin_ghost2");
object oGhost3 = GetObjectByTag("cntr_ruin_ghost3");
object oFlame = GetObjectByTag("cntr_ruin_ghostflame");
effect eVis = EffectVisualEffect(VFX_FNF_SMOKE_PUFF);
// check if it is dusk, use a variable to make sure this fires only once per dusk
if(GetLocalInt(GetArea(OBJECT_SELF), "daytime") == 1 && GetIsNight())
{
SetLocalInt(GetArea(OBJECT_SELF), "daytime", 0);
AssignCommand(oGhost1, ClearAllActions());
AssignCommand(oGhost1, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_night1")));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(GetWaypointByTag("WP_cntr_ruin_night1")));
AssignCommand(oGhost2, ClearAllActions());
AssignCommand(oGhost2, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_night2")));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(GetWaypointByTag("WP_cntr_ruin_night2")));
AssignCommand(oGhost3, ClearAllActions());
AssignCommand(oGhost3, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_night3")));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(GetWaypointByTag("WP_cntr_ruin_night3")));
AssignCommand(oFlame, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
}
if(GetLocalInt(GetArea(OBJECT_SELF), "daytime") == 0 && GetIsDay())
{
SetLocalInt(GetArea(OBJECT_SELF), "daytime", 1);
AssignCommand(oGhost1, ClearAllActions());
AssignCommand(oGhost1, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_day")));
AssignCommand(oGhost2, ClearAllActions());
AssignCommand(oGhost2, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_day")));
AssignCommand(oGhost3, ClearAllActions());
AssignCommand(oGhost3, ActionJumpToObject(GetWaypointByTag("WP_cntr_ruin_day")));
AssignCommand(oFlame, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
}
}
I’m using Carcerian’s Ultima NPC Schedules, that one works by putting a specific script in an NPC’s hb, the henchmen don’t use it.
I’ve noticed that behaviour in all henchmen who have been with the PC and then removed - two minor shmucks from escort quests and one Important Person. I got around it by simply destroying the randos when you’re done with them, but I can’t do it to the Important Person.
It may be quite some time since removing the henchman and it still happens. Also happens if you got a different henchman in the meantime. Happens when the removed henchman is jumped offstage.
I’ve just tested with the SetTime commented out and it didn’t happen, but I’ll run a few more tests, since I seem to recall it didn’t happen every single time (which is why I’ve been ignoring it for now and concentrating on other aspects of the module).
I didn’t know you could remove scripts from a creature, that sounds useful. How does that work?