PDA

View Full Version : XenoBot Bug - Non-Issue [Other] Creature.Follow w/ Captain Max



Bollo
10-22-2014, 06:13 PM
Bug ReportOperating System:
Other Short Description:
Creature.Follow w/ Captain Max Behaviors: Loss of or impaired functionality

Indepth Description:
So there is an NPC at Liberty Bay boat called Captain Max. While traveling to Calassa, the Creature.Follow works 100% as intended, just as on any other NPC.

BUT, on the way back, there is also Captain Max, but the Creature.Follow on him wont work there.

My guess is that maybe it has a different ID or something since its 2x the same NPC, but on different places.

However I have seen that sometimes (not often) it can follow the "2nd" Cpt Max successfully.

Bollo
10-23-2014, 08:31 PM
That is actually not a bug, this is just the way the battle list works.
Creature.Follow() uses the first entry in the battle list it can find that matches the name you want it to follow.
That means if you see Captain Max #1 first, it will only follow that one, if you see the other one first it only follows that one.

Use this and it should work fine.
function customFollowNPC(name)
for c, n in Creature.iNpcs() do
if (n:lower() == name:lower()) then
while (not c:isFollowed()) do
c:Follow()
end
end
end
end
Ah, I see!

I already made another code to work around it, but yeah thx anyway :)