DoCon

Category: Objects / Status
Since engine version: 4.6.5.0 CP

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

bool DoCon (int iChange, object pObj);

Parameters

iChange:
Change of completion in percentage point (positive or negative).
pObj:
[opt] Object to change. Can be 0 in local calls.

Examples

var obj;
while (obj=FindObject(0,0,0,0,0,OCF_Construct(),0,0,NoContainer(),obj)) DoCon(100,obj);
Completes all construction sites.
DoCon(-50, GetCursor(plr));
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, November 2001