I'm getting a little rusty on this myself, got too used to using xPositionCell now. Let's see... For moving an NPC to an exterior:
If the cell is active (ie the player is there), and the NPC is NOT already in the cell, PositionCell should work but you need to do visibility and AI fixes to make sure it's all fixed. The usual version (from CDCooley's Companion Teleporting) goes something like this IIRC:
PositionCell
wait 1 second
disable
enable
wait 0.7 sec (or so...)
disable
enable
AI command (AIFollow, AIWander, etc)
check NPC is in correct cell, if not then go back to the PositionCell and start over
check AI package, if it's OK then stop, if it's not what it should be then go on to:
startcombat player
wait 0.3 sec or until weapon drawn or spell readied
stopcombat
go back to the AI command (and also force-equip and remove a weapon or force-cast a spell in case they get stuck in weapon drawn/spellreadied)
The disable/enable parts are to make them properly visible, the combat is to fix AI glitches.
If the cell you're teleporting them to isn't active, you shouldn't need any of that.
BUT... If the NPC is already in an active cell, and you're moving them within the active cells, do NOT use PositionCell - instead use SetPos. Otherwise you get weird shadow-people that can't be activated, and that's not easy to fix.
I can probably write up a script for you if you want, just let me know what's supposed to happen specifically (AI, position coords, is the player there, etc).
Thanks Melian - there seems to be a lot of failsafe's built into that code
What I'm trying to do is create an NPC schedule for an exterior cell that is Ascadian Isles Region 2, -12 - I have 5 NPC's in the cell - 2 are guards though unique ones not clones
I was using max aka nobody's scheduler and found I could move one of the guards using PositionCell to an interior cell, set her to AIWander 0 and change out of her uniform, then I could send her to another interior - unfortunately the clothes change did not work a second time however at least she was int he right position
However when i tried to send her back to her original position in the exterior cell she would not show - I looked through the scripts of LCOV - which I can understand some of but they are really too advanced for me - however in the read me Wrye mentions he had trouble with unnamed exterior cells and positioncell would not work and position was problematic
I've settled for using clones a healthcheck on clone and original and lineofsight - it's still a bit clunky at the moment but at least the originals are appearing at the right times. I wonder if Bethesda had similar problems for the statue at Khartag Point and whay they used clones there?
Thanks for the info on using setpos when within a cell - I will try out AITravel for some of my NPC's and see if I can replicate Galbedir's walking script where she checks to see whether she is near hidden rings before she goes into AIwander mode.