When I first run the script, all henchmen are reported as being in the same area - an area NONE of them are in.
But then, if I move the henchmen to a different area, the script reports their area name correctly.
Any idea what I'm doing wrong? The script is below. I changed from using GetName(GetArea()) to GetName(GetAreaFromLocation(GetLocation())) just to see if there was a bug in GetArea(), but the results did not change.
void bchTellDMsHenchStatus(string sHenchTag, int nOrd = 0)
{
object oUser = OBJECT_SELF;
object oHench = GetObjectByTag(sHenchTag, nOrd);
location lHenchLoc;
string sOutput;
if (nOrd > 0) sOutput = "DUPE #" + IntToString(nOrd + 1) + ": ";
if (GetIsObjectValid(oHench))
{
sOutput += GetName(oHench) + " with ";
sOutput += GetName(GetMaster(oHench)) + " in ";
lHenchLoc = GetLocation(oHench);
sOutput += GetName(GetAreaFromLocation(lHenchLoc));
// AssignCommand(oHench, ActionJumpToLocation(GetLocation(oUser)) );
SendMessageToAllDMs(sOutput);
}
}





Retour en haut







