You need to use the Persistent Reference ID or Editor ID (text in the top field of the reference edit dialog for Persistent Reference IDs, or the text name of the object in the object list in the Construction Set for Editor IDs) instead of the Reference ID or Form ID (hex values of Persistent Reference IDs and Editor IDs, respectively) in scripts. Reference IDs and Form IDs are for use in the console. In this case, you need the Persistent Reference ID of the NPC you are having follow the player.
Otherwise, your script should work fine.
As a side note, 100 units is less than half the size of a basemant section, and it would be natural for a follower to be that distance from its follow target anyway. You may want to raise this value to something much higher so it won't seem like the follower is flickering due to all the teleportation it will be doing.
I appreciate the input.
I changed up the script so it referred to him as his reference editor id (and made the range substantially longer).
For some reason it still doesn't seem to want to work.
The script attached to the quest contains "short Knightfollow" and it seemed to work well in all other parts of the editor.
The Script results in the quest window is set to change the value and it is prompting the right dialog. He follows, fights, and ignores friendly fire just fine. He just gets left behind when I travel.
The script saves just fine and doesn't tell me I got it wrong.
After the re-wiring I came out with this.
Any tips that might get it up and running?:
ScriptName aaKnightBehavior
Begin GameMode
if AAKnight.Knightfollow 1
if Knight.GetDistance Player > 500
Knight.moveto Player
endif
if Knight.GetInSameCell player
else Knight.moveto Player
endif
endif
end