# Collect

Objects
Contents
5.1 OC
bool
object item Object to be collected.
Collects an object. This function performs the same events as they occur if the object is collected in the game through the Collection area (there will be a RejectCollect call, flag collection checks, hit calls, etc.) The only difference is that there will be no comparison of collection position and the collected item is not checked for the OCF_Carryable flag.
Using this function you can for example collect objects directly from a container. If the function fails (e.g. through a RejectCollect or a full target container) the function returns `false`, otherwise `true`.
protected func ContainedUse(object clonk) { var obj = Contents(); if (obj) if (!clonk->Collect(obj)) clonk->Message("Collect not possible.",clonk); return true; }
With contained use the first inventory object is passed to the selected clonk.
Enter
Sven2
2002-05