Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Verb question
Verb question
2002-01-17, 1:02 PM #1
How does FirstThingInView() work? and what is HasLOS()? I'm looking at the grip cog, and i dont know how these work. I cant find them in cogref. I know what FirstThingInView is, but i'm not sure exactly how its used.
2002-01-17, 1:17 PM #2
http://www.sfc.keio.ac.jp/~t00214ho/millennium/cogverb/?FirstThingInView

^ Straight from Hideki's site

HasLOS() checks to see if a thing can see another thing. Use: HasLOS(thing_looking, thing_target);
2002-01-17, 2:21 PM #3
FTIV() finds the "first" thing in the specified line of sight of a thing.
Code:
FirstThingInView(ofthing, LOS_degrees, distance, mask_flags);


The mask flags are used to screen what things are returned. So if you use a mask of 0x4, FTIV() will only look for actors. Look up Thing Type Mask Flags in the Specs for other listed flags.

FTIV() doesn't really care if the thing in "in view." It will find things right through walls. For that reason, HasLOS() is used to make sure the "ofthing" can see whatever FTIV() returns.

When FTIV() runs and does not find anything, it returns -1.

I don't know what makes a thing "first," but it may return things based on their thing number as FirstThingInSector() does.

[This message has been edited by SaberMaster (edited January 17, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!