DoCon

Category: Objects / Status
Since engine version: 5.1 OC

Description

Adjusts the completion value of an object. This affects the completion of construction sites or the growth of trees and living beings. If completion drops below 0, the object is removed.

Syntax

void DoCon(int change);

Parameter

change:
Change of completion in percentage point (positive or negative).

Examples

var obj;
for(var obj inFindObjects(Find_OCF(OCF_Construct),Find_NoContainer(),Find_Not(Find_OCF(OCF_Fullcon)))) obj->DoCon(100);
Completes all construction sites.
GetCursor(plr)->DoCon(-50);
Robs the selected crewmember half of its normal size, if the object was fully grown, its half-grown afterwards, if it was half-grown, it vanishes.
See also: GetCon, SetCon
Sven2, 2001-11