🎮cuser_cmd

Describes a user command.

command_number

FieldRead only

Type: int

Current command number.


get_button

Method

Returns state of the specified button.

Arguments

1. Button

Name

Type

Description

button

Button.

Returns

Type

Description

bool

Is pressed.

Example


set_button

Method

Sets the specified button into the command.

Arguments

1. Button

Name

Type

Description

button

Button.

Example


remove_button

Method

Removes the specified button from the command.

Arguments

1. Button

Name

Type

Description

button

Button.

Example


get_viewangles

Method

Returns the current viewangles of the command.

Arguments

None.

Returns

Type

Description

Viewangles.

Example


set_viewangles

Method

Sets the specified angles into the command.

Arguments

1. Angles

Name

Type

Description

angles

Angles.

Example


lock_angles

Method

Sets the command viewangles into the games view.

Arguments

None.

Example


get_forwardmove

Method

Returns the forwardmove of the command. (0.0 - 1.0)

Arguments

None.

Returns

Type

Description

float

forwardmove.

Example


get_leftmove

Method

Returns the leftmove of the command. (0.0 - 1.0)

Arguments

None.

Returns

Type

Description

float

leftmove.

Example


set_forwardmove

Method

Sets the specified forwardmove into the command. (0.0 - 1.0)

Arguments

Type

Description

float

forwardmove.

Example


set_leftmove

Method

Sets the specified leftmove into the command. (0.0 - 1.0)

Arguments

Type

Description

float

leftmove.

Example


rotate_movement

Method

Rotates the commands movement toward the specified yaw without affecting viewangles.

Arguments

Type

Description

float

yaw.

Example

Last updated