SetController

Category: Objects / Status
Since engine version: 4.9.6.0 CR

Description

Changes the controller of an object.

Syntax

bool SetController (int iNewController, object pObj);

Parameters

iNewController:
Player number of the new controller. -1 for no controller.
pObj:
[opt] Object of which the controller is to be changed. Can be 0 in local calls.

Example

protected func Entrance(pContainer) { SetController(GetController(pContainer)); return(); }
This object changes its controller when it is collected.
See also: GetController, GetKiller, SetOwner
Sven2, April 2007