At a guess, it's how long the character has to get close to you. Sometimes the character might not follow you around in the scene in which you met him, but he should appear when you go to another location and then follow you around. He really will follow you everywhere - ever played the "Missing Son of Spanish Admiral" sidequest and seen Lucas follow you around until you finally deliver him to his father? He'll follow you even to places where officers don't go, such as the tavern room at night.
You can use 'LAi_Type_Actor_Reset' to stop him following you when you find the second character.
More problems with ActorFollowEverywhere
@Pieter Boelen gave me an idea which I'm now working on. I had this line of code:
Code:
LAi_ActorFollowEverywhere(CharacterFromID("Lyndon Aidoo"), "", 1.0);
...which originally had a 0 at the end, but with the 0, he only starts following me everywhere when I enter a location and then return. With 1, he follows immediately. So far, so good.
At a specific locator, stuff happens. He gets
LAi_type_actor_Reset and then
LAi_SetStayType. Because at this point, the player is set to ActorType so the player doesn't run away, and as far as I know, one of the two must always be ActorType to initiate a conversation. After said conversation, Lyndon Aidoo is set to ActorType again and given two
ActorRunToLocator commands. And then, he is supposed to follow me everywhere again, but this time, he only does so when I enter and leave another location. It's the same line of code as before.
Even though it shouldn't make a difference, I even added one more quest case:
Code:
case "monolith_over":
LAi_SetPlayerType(pchar);
GiveItem2Character(PChar, "human_skull");
Pchar.monolith.over = "yes";
Pchar.monolith_found.over = "yes";
pchar.quest.MONOLITH = "done";
Lai_ActorFollow(characterFromID("Lyndon Aidoo"), pchar, "monolith_fin", 8.0);
break;
case "monolith_fin":
LAi_ActorFollowEverywhere(CharacterFromID("Lyndon Aidoo"), "", 1.0);
break;
No he does run to me courtesy of the
Lai_ActorFollow, but still does not follow me everywhere immediately.