Got it! The code you're looking for is in PROGRAM\Loc_ai\LAi_groups.c:Defined thus:(Inside spoiler tags because there's rather a lot of it.)Code:void SoldierReinforcements(ref refCharacter) { ref PChar = GetMainCharacter(); if (sti(GetAttribute(refCharacter, "quest.guard_protection")) < 1) { if (GetAttribute(PChar , "vcskip") == true) return; if (GetAttribute(LoadedLocation, "vcskip") == true) return; if(!HasSubStr(GetAttribute(refCharacter, "id"), "soldier")) return; if(!HasSubStr(GetAttribute(refCharacter, "Dialog.Filename"), "Soldier_dialog.c")) return; if(!HasSubStr(GetAttribute(refCharacter, "location"), "port") && !HasSubStr(GetAttribute(refCharacter, "location"), "town")) return; } int numGuards = 30 - LAi_numloginedcharacters; // LDH - changed from 32 to TIH's original 30 if (numGuards > 2 ) numGuards = 2; if (numGuards > 0 ) { Logit(TranslateString("","The Garrison Commander sent immediate reinforcements...")); LAi_CreateFantomGroup("Soldiers", numGuards, LAI_GROUP_ENEMY, LAI_GROUP_NEUTRAL, GetCurrentLocationNation(), OFFIC_TYPE_GUARD, 0, true, "", "", "", ""); if(!CheckAttribute(PChar, "locationLock")) { PChar.locationLock = true; StartQuestMovie(true, false, false); } } }
That seems to lock exits and send reinforcements. It doesn't seem to unlock them again after all the soldiers are dead. Where is the code for the end of the battle? That's when you'd have time to help yourself to one of the dead guards' uniforms...
Code:
//------------------------------------------------------------------------------------------
//The response to requests
//------------------------------------------------------------------------------------------
//Update the alarm, called on every frame
#event_handler("CharacterGroup_UpdateAlarm", "LAi_group_UpdateAlarm");
void LAi_group_UpdateAlarm()
{
ref mchr = GetMainCharacter(); // KK
LAi_grp_playeralarm = GetEventData();
LAi_grp_alarmactive = GetEventData();
if(!bSeaActive)
{
// PB -->
if(!LAi_grp_alarmactive && CheckAttribute(mchr, "locationLock"))
{
EndQuestMovie();
DeleteAttribute(mchr,"locationLock");
}
// PB <--
