Use this instead ... should be quicker too.
global PIVOT = createpivot() ;=========================== ;Point Entity at x,y,z ;=========================== Function Point_Entity(entity, x#,y#,z# ) positionentity PIVOT, x, y, z Dy# = deltayaw( entity, PIVOT ) Dp# = deltapitch( entity, PIVOT ) turnentity Entity, Dp, Dy, 0 End Function ;===========================