projectile=FireProjectile(fire_thing, template, sound, submode, offset_vec, error_vec,
extra_flex, proj_flags, AA_FOVX, AA_FOVZ);
fire_thing: This is the thing to fire the projectile from. The fired projectile will travel in the direction that this thing is looking. And if the fire_thing is a creature, the projectile will travel in the direction of the creature's torso, and not the true lookvector of the fire_thing.1
The fired projectile will be linked to the fire_thing's parent chain. If the fire_thing has itself for a parent, it will become the parent of the projectile. Read the Thing Property Notes for more information on parents.
template: This is the template to create the projectile from.
sound: This is a sound to play as the projectile is created. Use -1 for this parameter if you don't want to play a sound.
submode: This is the submode number of a keyframe in the fire_thing's puppet. When the projectile is fired, the keyframe will be played with the fire_thing. The most common submodes used are 8 for small fire and 18 for large fire. Use -1 for no animation.
offset_vec: This is an offset from the player's position that the projectile will appear at. It is in the form of 'sideways forward upward' and is given in JKUs. Projectiles are usually put a little in front and to the right of the fire_thing so that they look better in the POV camera.
error_vec: This vector is used to give aiming error to projectiles. It is given in the form: 'upward sideways 0'. The error vector is, of course, 2d because you can't aim in front or behind a target.
extra_flex: This flex is used by various Projectile Flags to control the projectile.
proj_flags: These Projectile Flags control how the projectile is fired.
AA_FOVX: This is the lateral Field of View in degrees. If an enemy is within this FOV, the projectile will be aimed at it. The 0x20 Projectile Flag must be used to enable auto-aim, and the 0x40 flag must be used to make it work in multiplayer.
AA_FOVZ: This is the vertical Field of View in degrees. Together, the FOVX and FOVZ are used to create a 3d cone in front of the player. If the enemy is inside this cone, the projectile that is fired will be auto-aimed at it.