To be more presise, I'm trying to get the NPC to move to a spot, and play the "follow me" animation until the player gets close enough, before sitting down at a table in a deserted corner of the tavern, at which point his quest becomes available.
I'm doing this through a script attached to the NPC:
scn danOffalScript
begin gamemode
if getstage danGobboQuest == 5
if danOffalREF.Getdistance danOffalBeckonMarker == 0
danOffalREF.additem danAnimationAmulet 1
setstage danGobboQuest 6
endif
elseif getstage danGobboQuest== 6
if player.Getdistance danOffalREF <= 128
setstage danGobboQuest 7
endif
endif
end
begin gamemode
if getstage danGobboQuest == 5
if danOffalREF.Getdistance danOffalBeckonMarker == 0
danOffalREF.additem danAnimationAmulet 1
setstage danGobboQuest 6
endif
elseif getstage danGobboQuest== 6
if player.Getdistance danOffalREF <= 128
setstage danGobboQuest 7
endif
endif
end
(BTW, Dan's my name, so I'm using it as a prefix for everything in my mod, to hopefully eliminate incompatibility, and "Offal" is the name of the NPC, who happens to be a necromancer).
If the quest is at stage 5, Offal the necromancer moves to his position (danOffalBeckonMarker), and recieves an (unplayable and invisible) amulet, that is required to play the "follow me" animation (the exact conditions for the animation can be seen http://i101.photobucket.com/albums/m43/danburite/animationconditions.jpg). At this point, the quest is moved to stage 6, which is mostly just there to determine if the player is close enough to the NPC. One the player is close enough, the quest is supposed to move to stage 7, where the NPC sits down, and offers the quest.
At least, that's what's supposed to happen. Currently, my NPC moves to the spot as intended, but doesn't play his animation, and doesn't sit down once the player gets close enough.
Oh, and the conditions for the various AI packages are:
danOffalBeckonPackage (for beckoning to the player): Must Reach Location, Must Complete, Skip Fallout Behaviour, target: no, getstage danGobboQuest == 5 OR 6
danOffalSitPackage (for sitting at the table): Must Reach Location, Must Complete, Once Per Day, target: no, getstage danGobboQuest == 7
So... any ideas on how to fix it?