Skip to content

Commit 7bed033

Browse files
authored
Update Functions-(Binding-Scan).md
1 parent 27725ad commit 7bed033

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/7.0/Functions-(Binding-Scan).md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44

55
## …binding_scan_start
66

7-
`input_binding_scan_start(successCallback, [failureCallback], [sourceFilter], [playerIndex])`
7+
`input_binding_scan_start(successCallback, [failureCallback], [playerIndex])`
88

99
<!-- tabs:start -->
1010

1111
#### **Description**
12-
12+
sc`
1313
**Returns:** N/A (`undefined`)
1414

1515
|Name |Datatype |Purpose |
1616
|-------------------|---------------------------------|------------------------------------------------------------------------------------------------------------------------|
1717
|`successCallback` |method |Callback function to execute when the binding scan process completes successfully |
1818
|`[failureCallback]`|method |Callback function to execute when the binding scan process fails. If not specified, no function is executed upon failure|
19-
|`[sourceFilter]` |array of [sources](Input-Sources)|[Input sources](Input-Sources) to listen to. If not specified, all of the chosen player's current sources are used |
2019
|`[playerIndex]` |integer |Player to target. If not specified, player 0 is targeted |
2120

2221
This function will scan for input from a player and then execute a callback when a new, valid input was detected. The success callback is passed a single argument which is the new binding that corresponds to the detected input. After you receive the new binding in the success callback, you should then set that binding for the desired verb using `input_binding_set_safe()` (or `input_binding_set()` if you want to live dangerously).
2322

24-
Bindings that have not been emitted by [sources](Input-Sources) defined by the `sourceFilter` argument will be ignored.
25-
2623
If something unexpected happens (for example, the player's gamepad is disconnected) then this function will attempt to execute the failure callback. The failure callback is given a single argument too, though this time the value is an error code from the `INPUT_BINDING_SCAN_EVENT` enum. Error codes that this function can return are as follows:
2724

2825
|Name |Meaning |
@@ -234,4 +231,4 @@ The struct returned by this function has three elements (`.ignore_array` `.allow
234231
235232
Clears the parameters set for binding scanning for the given player. No bindings are ignored, no bindings are explicitly allowed.
236233
237-
<!-- tabs:end -->
234+
<!-- tabs:end -->

0 commit comments

Comments
 (0)