SetComDir

Category: Objects / Movement
Since engine version: 4.6.5.0 CP

Description

Sets the order direction of an object (see GetComDir).

Syntax

int SetComDir (int iComDir, object pObj);

Parameters

iComDir:
pObj:
[opt] Object the order direction of which you want to set. Can be 0 in local calls.

Example

var pClnk = GetHiRank(0);
SetComDir(COMD_None(), pClnk);
SetCommand(pClnk, "");
Tells the highest ranking clonk of player 1 to stop. Any current activity will be stopped.
var pClnk = GetHiRank(0);
ObjectSetAction(pClnk, "Dig");
SetComDir(COMD_DownRight());
Makes the highest ranking clonk of player 1 dig towards the lower right.
See also: GetComDir, SetDir
jwk, August 2002