GetHomebaseProduction

Category: Player
Since engine version: 4.9.8.5 CR

Description

With id specified, the function returns how quickly objects of that type are resupplied to the player's home base. In this case iIndex and dwCategory are ignored. If id is 0, the function returns the id of the indicated type of objects of the specified category in the player's resupply list. This will return all object types from the resupply list, even if they are currently not being resupplied.

Syntax

int GetHomebaseProduction (int iPlr, id id, int iIndex, int dwCategory);

Parameters

iPlr:
Number of the player whose buying options you want to determine. The first player has the player number 0.
id:
[opt] If specified, the function returns the number of objects of the given type which are resupplied to the player's home base. In this case iIndex and dwCategory are ignored.
iIndex:
[opt] List index of the buyable item to check.
dwCategory:
[opt] Category of buyable items you want to check.

Example

if(!GetHomebaseProduction(0, FLNT)) GetCursor(0)->CreateContents(FLNT);
Gives a flintstone to the selected clonk of the first player if currently no flintstones are resupplied to the player's home base.
See also: C4D_All, C4D_Goal, C4D_Knowledge, C4D_Living, C4D_Object, C4D_Rule, C4D_StaticBack, C4D_Structure, C4D_Vehicle, DoHomebaseMaterial, DoHomebaseProduction, GetHomebaseMaterial
Clonk-Karl, März 2008