Returns the thing with the highest thing number that meets the given FOV and mask requirements. FTIV() will find things behind walls, so HasLOS() should be used to make sure the player can see whatever FTIV() returns. Like other verbs that return a value, FTIV() will return -1 if is given the right parameters but cannot find anything. Syntax:
thing=FirstThingInView(view_thing, FOV, distance, mask_flags);
view_thing: This is the thing whose view will be used.
FOV: This is the field of view to look inside of.
distance: This is the distance in sectors (not JKU's, as was originally believed) between the view_thing and it the player thing.
mask_flags: The Mask Flags screen out things that should not be returned. The most common combination of Mask Flags is 0x404. This will return only players (0x400) and actors (0x4).