I recently ran some tests to see if the old lexicon description for GetIsInSubArea() was correct, and instead found it is misleading so I changed it.
I want to verify with others whether I have this correct:
It appears that a list is maintained for objects which have entered a trigger (or perhaps any enterable object), and that when they exit they are removed from the list. If this is true, then GetIsInSubArea simply checks to see if oCreature is still on the list for the given object.
If this is the case, then this function is indeed valuable, and I have plans for using it further.
I came to this conclusion after running some tests with triggers each containing onEnter and onExit scripts.
ENTER SCRIPT:
void main()
{
object oPC = GetEnteringObject();
string sLastArea = GetLocalString(oPC, "TEST_TRIGGER_LAST");
int bLast = GetIsInSubArea(oPC, GetObjectByTag(sLastArea));
SendMessageToPC(oPC, "ENTER("+GetTag(OBJECT_SELF)+") LAST("+sLastArea+") IN_LAST("+IntToString(bLast)+")");
}
EXIT SCRIPT:
void main()
{
object oPC = GetExitingObject();
string sLastArea = GetTag(OBJECT_SELF);
SetLocalString(oPC, "TEST_TRIGGER_LAST", sLastArea);
int bLast = GetIsInSubArea(oPC, OBJECT_SELF);
SendMessageToPC(oPC, "EXIT("+sLastArea+") IN_SUBAREA("+IntToString(bLast)+")");
}





Retour en haut






