GetPedAnalogControlState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Function arguments updated as pull #1165 was merged) |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">float getPedAnalogControlState ( ped thePed, string controlName )</syntaxhighlight> | <syntaxhighlight lang="lua">float getPedAnalogControlState ( ped thePed, string controlName [, bool rawValue ] )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePed:''' The ped you wish to retrieve the control state of. | *'''thePed:''' The ped you wish to retrieve the control state of. | ||
*'''controlName:''' The control. See [[control names]] for a list of possible controls. | *'''controlName:''' The control. See [[control names]] for a list of possible controls. | ||
===Optional Arguments=== | |||
{{New feature/item|3.0157|1.5.7|20383| | |||
*'''rawValue:''' A bool indicating whether to poll for raw controller state, which ignores keyboard input and any overrides from [[setPedAnalogControlState]] and others. When set to true, and a controller is not used, the function will always return 0. | |||
}} | |||
===Returns=== | ===Returns=== |
Revision as of 12:45, 16 January 2020
Script Example Missing Function GetPedAnalogControlState needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This function retrieves the analog control state of a ped, as set by setPedAnalogControlState.
Syntax
float getPedAnalogControlState ( ped thePed, string controlName [, bool rawValue ] )
Required Arguments
- thePed: The ped you wish to retrieve the control state of.
- controlName: The control. See control names for a list of possible controls.
Optional Arguments
- rawValue: A bool indicating whether to poll for raw controller state, which ignores keyboard input and any overrides from setPedAnalogControlState and others. When set to true, and a controller is not used, the function will always return 0.
Returns
Returns a float between 0 ( full release ) and 1 ( full push ) indicating the amount the control is pushed.
Example
-- todo
Requirements
This template will be deleted.
See Also
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle