This is the Direction Tools v.0.1 toolbox which allows one to obtain the Angle (orientation) of an entity. 

INTRODUCTION: It consists of the following files:

In the Directory entitybank/Characters we have: 
agent.fpe, agent.bmp:      These introduce a new entity , "agent", which is set-up (by agent.fpe) to use the script "_agent.lua".

In the Directory scriptbank we have:
_agent.lua                  The basic script for "agent".
_functions.lua              The functions used to obtain the Angle rotation 
                            and do some other tricks.
_global.lua                 This is called by "global.lua" to define some new tables
_scripts.lua                These scripts can be called from "_agent.lua", to get some
                            examples of the toolbox capabilities. Go to line 46 of 
                            "_agent.lua" and change "script12.lua" to "script13.lua" etc.
global.lua, global.old.lua  CAREFUL!!! "global.old.lua" is the ORIGINAL "global.lua" file 
                            from the FPSC-R distribution. Use this if you want to go back 
                            and undo the installation of Direction Tools. On the other 
                            hand, the "global.lua" file included here has a few lines 
                            added, needed for Direction tools works correctly.

INSTALLATION: Keeping the above remarks in mind, installation of Direction Tools
is extremely simple:
1. Unzip DirToolsv01 into a clean directory, say DIRTOOLS.
2. Go to FPSCR\Files\scriptbank and BACKUP "global.lua".
3. Copy the contents of DIRTOOLS into FPSCR\Files\

USAGE: Start "FPSCreator.exe", in the Map Editor go to "Add New Entity", then to "characters" and add a few "agent" entities to the map. Also add a "Player Start" marker. Then hit the little Rocket icon to see what the agents do. You can observe different behaviors by going to line 46 of "_agent.lua" and changing "script12.lua" to "script11.lua", "script13.lua" etc. Or, you can experiment with writing your  own scripts. You can see some YouTube videos at http://... . 