Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

findchain

From Quake Wiki

Revision as of 01:15, 24 October 2009 by 94.193.174.213 (talk) (initial revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

entity findchain (.string fld, string match)

  • fld = label of field to query
  • match = value in field to match on

The functionality of find in the format of findradius - chains up matches into the .chain field of entities. Proper use would look something like:

local entity head;
head = findchain(classname, "player");
while (head)
{
  T_Damage(head,self,self,10);
  head = head.chain;
}