SetOwner

Category: Objects / Status
Since engine version: 1.0 OC

Description

Changes the owner of the object.

Syntax

bool SetOwner(int new_owner);

Parameter

new_owner:
Player number of the new owner. NO_OWNER for no owner.

Remark

This function also changes the controller to the new owner.

Example

protected func Entrance(object container) { SetOwner(container->GetOwner()); }
This object changes its owner when it is collected.
See also: GetOwner, MakeCrewMember, SetController
Sven2, 2001-11