MakeCrewMember

Category: Objects / Crew
Since engine version: 4.6.5.0 CP

Description

Adds an object (usually a clonk) to the crew of a player. The object must have the CrewMember property set in the DefCore.
Returns 1 if the object was added successfully.

Syntax

bool MakeCrewMember (object pObj, int iPlayer);

Parameters

pObj:
Object (clonk) to be added to the crew
iPlayer:
Player to whose crew you want to add a member.

Example

var nclnk = CreateObject(CLNK, 0, 0, GetOwner());
MakeCrewMember(nclnk, GetOwner());
    
This script creates a new clonk and adds it to the crew list of the owner.
See also: CrewMember, GetCrew, GrabObjectInfo, OCF_CrewMember, SetCrewStatus
PeterW, Dezember 2001