SetCrewEnabled

Category: Objects / Crew
Since engine version: 4.9.1.0 GWE

Description

Activates or deactivates crew members. Deactivated crew members can no longer be selected for control by a player. If all of a player's crew members are deactivated the player can not control any clonks but he is still not eliminated. Only valid for true crew member objects. Deactivated crew members are automatically deselected from player control.

Syntax

bool SetCrewEnabled (bool fEnabled, object pObj);

Parameters

fEnabled:
Specifies whether the crew member is to be activated or deactivated.
pObj:
Object for which you want to change the status. Can be 0 in local calls.

Example

SetCrewEnabled(0, GetCursor());
Deactivates the selected clonk of the first player.
See also: GetCrewEnabled, MakeCrewMember, SelectCrew
Sven2, April 2002