Deprecated: Assigning the return value of new by reference is deprecated in /home/jkhub/public_html/library/includes/Skin.php on line 134

Deprecated: Assigning the return value of new by reference is deprecated in /home/jkhub/public_html/library/includes/Title.php on line 132

Deprecated: Assigning the return value of new by reference is deprecated in /home/jkhub/public_html/library/includes/Title.php on line 219
JK Hub - [Reference]

COG Verb - FirstThingInView

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).

  • Create:
This page was last modified 19:15, 24 October 2009.   This page has been accessed 1,316 times.