Honestly I don't know what these functions return, so that's for someone else to answer, but...
I agree to your question-- What projectile does this script "look at" // is the weapon assigned to the function somewhere?
(for testing) Eliminate your [ i f ] statement, (remark it out temporarily) just to make sure
that the if statement is not stopping your debugging line
Try this print out;
TextCenterOnXColor(50,55,3," x: "..g_projectileevent_x.." y: "..g_projectileevent_y.." z: "..g_projectileevent_z,255,255,255)
This goes only one loop though... but if it runs continuously, it might show the whole path?
Useful? Maybe, maybe not?