Category: Objects
/ Commands Since engine version: 4.9.6.0 CR
Description
Executes the command szCommand for the currently selected clonk of player iPlr. See SetCommand for defined commands.
Syntax
bool PlayerObjectCommand
(int iPlr, string szCommand, object pTarget, int iX, int iY, object pTarget2, int iInterval, any Data, int iRetries, int iBaseMode);
Parameters
iPlr:
Player number
szCommand:
Command name (as string). See the table below
pTarget:
[opt]
target object for the command
iX:
[opt]
X target coordinate
iY:
[opt]
Y target coordinate
pTarget2:
[opt]
secondary target object
iInterval:
[opt]
Time (in ticks or frames) until the command is terminated
Data:
[opt]
additional data for the command
iRetries:
[opt]
Number of retries if the command fails, until the command fails completely.
iBaseMode:
[opt]
Command stack mode. See AddCommand for values.
Example
PlayerObjectCommand(0, "Throw");
Gives the selected clonk the command to throw the first inventory object.