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

findchain

From Quake Wiki

Revision as of 16:22, 29 March 2013 by Move page script (talk) (Move page script moved page Findchain to findchain: Fixing the case)
(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;
}