SetAnalogControlState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
{{Needs Example}}
This sets the analog control state of a control.
This sets the analog control state of a control.



Revision as of 21:36, 8 September 2012

Accessories-text-editor.png Script Example Missing Function SetAnalogControlState needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This sets the analog control state of a control.

Syntax

 bool setAnalogControlState ( string controlName , float state ) 

Required Arguement

  • controlName: the control name you wish to set the analog state of. Here's a list:
    • left
    • right
    • forwards
    • backwards
    • vehicle_left
    • vehicle_right
    • steer_forward
    • steer_back
    • accelerate
    • brake_reverse
    • special_control_left
    • special_control_right
    • special_control_up
    • special_control_down
  • state: a float between 0 and 1 indicating the amount the control is pressed.

Returns

Returns true, else false if invalid argument.

See Also